breakage with (some) multipart message bodies
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dkimpy-milter |
Expired
|
Undecided
|
Unassigned |
Bug Description
I have 2 cases where the body seems to be modified by the milter. Most of the messages go through fine. Not sure what causes this to break on some but here's the info I found:
Setup:
- dkimpy-milter is running on border mailer in verify only mode.
- dkimpy-milter also running on internal mailer (SV)
What I've seen in 2 cases is the border mailer check succeeds and dkim passes - then after that the interior mail finds that the body of the mail is altered - which it has as I show below:
In the first instance the mail was s/mime signed and both s/mime validation and dkim validation fail on interior. This mail was from a .mil server -
In 2nd instance, was mail (spammy) from gmail - again it is dkim pass on border and then dkim fail on internal.
The message was thus modified after the dkim verification occurred in the first instance of the milter.
What seems to be broken is the boundary tag of the multipart content type info - I know little to nothing about mime so perhaps there's more to this. But for sure the body has been altered passing through the border mailer for these 2 examples.
Message 1:
----------
Header has:
Content-Type: multipart/mixed; boundary=
Body has (internal mail server)
--=====
Content-Type: text/html; charset="us-ascii"
MIME-Version: 1.0
Content-
Here: Body was broken with the first 2 "==" being converted to "--". I have looked at other messages and see that some times there are 2 more "--" in body vs header - so hopefully some expert knows more than I do.
Message 2:
----------
Header has:
Content-Type: multipart/signed;
boundary=
protocol=
Body has:
------=
Content-Type: multipart/mixed; boundary=
Here: Body was broken with extra "--" being added.
Summary:
Either postfix is broken (version 3.7.2) or dkimpy-milter it would seem.
There's also libmilter (from Sendmail) and pymilter (milter library Python bindings) in the mix.
dkimpy-milter does not replace the body of the message, so I think it's very unlikely to be either dkimpy-milter or pymilter. If I were to suggest a most likely suspect, I would expect libmilter. What version of that do you have?