Hey everyone, I got a really strange issue today which boils down to how we interpret the RFC.
A user reached out to us saying their email, when going through ImprovMX, where then failing the DKIM Signature. Upon investigation, we discovered that indeed, checking the DKIM signature was failing because of a body mismatch. Digging further, we discovered that a dot was removed from the message when going through our servers. It turns out that one of their link in the email is broken into multiple line (following the RFC on that) and surprisingly, the dot from "www.domain" was starting as the new line, which gives: .domain.com/path/ The RFC 5321, Section 4.5.2 <https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.2> says : When a line of mail text is received by the SMTP server, it checks the > line. If the line is composed of a single period, it is treated as the end > of mail indicator. If the first character is a period and there are other > characters on the line, the first character is deleted. Which is why aiosmtpd is doing : https://github.com/aio-libs/aiosmtpd/blob/master/aiosmtpd/smtp.py#L1489 We discovered the issue because the destination server, Google, was putting the email in spam as it wasn't respecting the DMARC (of course, the DKIM Signature was broken). Upon further investigation, we realized that GMail does NOT respect that RFC. They keep the dot. And if you add two dots, as per the RFC, GMail will keep the two dots, making the URL broken. So, I'm reaching out to you in the hope to have some help on what do to. Part of me want to reply to that user that we have to follow the RFC, but maybe we are following the wrong RFC? I don't know, honestly. Thank you for your help !
_______________________________________________ mailop mailing list mailop@mailop.org https://list.mailop.org/listinfo/mailop