webmail: don't select requiretls when mta-sts and dane are both not implemented (even though requiretls extension is announced)

This commit is contained in:
Mechiel Lukkien 2023-11-09 19:57:53 +01:00
parent deb16d23b8
commit 96faf4b5ec
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -2135,7 +2135,7 @@ const compose = (opts) => {
let reqtls = opts.isList !== true;
const walk = (l) => {
for (const v of l) {
if (v.recipientSecurity?.RequireTLS !== api.SecurityResult.SecurityResultYes) {
if (v.recipientSecurity?.RequireTLS !== api.SecurityResult.SecurityResultYes || v.recipientSecurity?.MTASTS !== api.SecurityResult.SecurityResultYes && v.recipientSecurity?.DANE !== api.SecurityResult.SecurityResultYes) {
reqtls = false;
break;
}

View file

@ -1330,7 +1330,7 @@ const compose = (opts: ComposeOptions) => {
let reqtls = opts.isList !== true
const walk = (l: AddrView[]) => {
for (const v of l) {
if (v.recipientSecurity?.RequireTLS !== api.SecurityResult.SecurityResultYes) {
if (v.recipientSecurity?.RequireTLS !== api.SecurityResult.SecurityResultYes || v.recipientSecurity?.MTASTS !== api.SecurityResult.SecurityResultYes && v.recipientSecurity?.DANE !== api.SecurityResult.SecurityResultYes) {
reqtls = false
break
}