liuch / dmarc-srg

A php parser, viewer and summary report generator for incoming DMARC reports.
GNU General Public License v3.0
228 stars 34 forks source link

Make MailMessage::getAttribute case-insensitive #8

Closed rmontagud closed 3 years ago

rmontagud commented 3 years ago

I've setup your tool but it wasn't detecting attachments due to the part atrribute names being in uppercase.

The best way for me to make it work was to ensure the attribute names were read anyway, so i've changed it to use strcasecmp instead of the previous comparison

liuch commented 3 years ago

Can you show me a cut of your message where I can see that attribute? And if possible, tell me which server sends messages with such attributes, please.

rmontagud commented 2 years ago

Sure, it's Zimbra, but i'm puzzled because the downloaded raw message has the appropiate casing in the attributes so something it's changing the case

   --report_section
   Content-Type: application/zip
   Content-Disposition: attachment; filename="infomaniak.com!domain.org!1636498800!1636585200.zip"
   Content-Transfer-Encoding: base64

If it helps: imap client runs on PHP 7.3 and the mail server is zimbra

liuch commented 2 years ago

Thank you for sharing this.