Hi
I just debugged why a mail from me got into the spamfolder of an receiver. In the header I found that the DKIM signature was broken (mail was modified).
Test setup which sends invalid DKIM:
Test setup which sends valid DKIM:
I sent the same mail 2 times to my test server. One time with PMG as outgoing mailserver and one time I sent mails out directly.
Result was that the mail going out directly has an valid DKIM signature. The mail sent out over PMG has an invalid DKIM signature.
It looks like PMG adds an empty line between the parts of the mime multipart mail.
If I remove the empty line manually with an text editor the DKIM signature is valid again.
I attached 3 example eml files which shows the problem.
(Can't attach *.eml files so i changed the file extension to txt)
For testing the DKIM signature I used Thunderbird with the "DKIM Verifier" extension and "ImportExportTools NG" for importing the *.eml files.
As far as I have tested it it only happens with mime multipart mails (html in body + attachment)
Has someone an idea why this empty line is added to the mail by PMG?
Is there maybe somewhere config option for that?
Currently it looks more like a bug for me.
I just debugged why a mail from me got into the spamfolder of an receiver. In the header I found that the DKIM signature was broken (mail was modified).
Test setup which sends invalid DKIM:
Code:
Thunderbird -> Mailserver (creates the DKIM signature) -> Proxmox Mail Gateway -> My Test Mailserver
Code:
Thunderbird -> Mailserver (creates the DKIM signature) -> My Test Mailserver
I sent the same mail 2 times to my test server. One time with PMG as outgoing mailserver and one time I sent mails out directly.
Result was that the mail going out directly has an valid DKIM signature. The mail sent out over PMG has an invalid DKIM signature.
It looks like PMG adds an empty line between the parts of the mime multipart mail.
If I remove the empty line manually with an text editor the DKIM signature is valid again.
I attached 3 example eml files which shows the problem.
correct_dkim.txt
-> This mail was sent without the PMGwrong_dkim.txt
-> This mail was sent with PMG as outgoing server and has a broken DKIM signaturewrong_dkim_manually_repaired.txt
-> This is the same mail where I manually removed the extra empty line (so the DKIM signature is valid again)(Can't attach *.eml files so i changed the file extension to txt)
For testing the DKIM signature I used Thunderbird with the "DKIM Verifier" extension and "ImportExportTools NG" for importing the *.eml files.
As far as I have tested it it only happens with mime multipart mails (html in body + attachment)
Has someone an idea why this empty line is added to the mail by PMG?
Is there maybe somewhere config option for that?
Currently it looks more like a bug for me.