Public bug reported:

Using Mailman 2.1.33. I noticed that occasionally, DMARC mitigations for
aol.com "From" addresses were not being applied.

I tracked us down to the fact that DNS records can in rare cases return
"AOL" in uppercase in the answer of the TXT record lookup. Here's an
example where I caught it happening:


 $ dig _dmarc.aol.com TXT

 [...]

 ;; QUESTION SECTION:
 ;_dmarc.aol.com.            IN  TXT

 ;; ANSWER SECTION:
 _dmarc.AOL.com.     492 IN  TXT "v=DMARC1; p=reject; pct=100; 
rua=mailto:[email protected]; ruf=mailto:[email protected];";


Note that we requested "_dmarc.aol.com" in the question section, but got back 
"_dmarc.AOL.com" in the answer section. That case mismatch makes this code in 
Mailman/Utils.py skip the record:

        for name in want_names:
            if name not in results_by_name:
                continue

I believe the solution is to lowercase the result after the lookup.
Patch attached.

** Affects: mailman
     Importance: Undecided
         Status: New


** Tags: dmarc

** Patch added: "Lowercase DMARC TXT record label in answer section"
   
https://bugs.launchpad.net/bugs/1881035/+attachment/5377571/+files/mailman-dmarc-lowercase.patch

-- 
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/1881035

Title:
  DMARC mitigation fails if TXT record name contains uppercase

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/1881035/+subscriptions
_______________________________________________
Mailman-coders mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-coders.python.org/
Member address: [email protected]

Reply via email to