breakage with (some) multipart message bodies

Bug #1974038 reported by Gene
6
This bug affects 1 person
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="===============1820347553753871030=="

Body has (internal mail server)
--===============1820347553753871030==
Content-Type: text/html; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

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="----=_NextPart_481_c46f_5f764239.82ea1ecc";
 protocol="application/x-pkcs7-signature"; micalg=sha256

Body has:
------=_NextPart_481_c46f_5f764239.82ea1ecc
Content-Type: multipart/mixed; boundary="------------030500020404000600000004"

Here: Body was broken with extra "--" being added.

Summary:
  Either postfix is broken (version 3.7.2) or dkimpy-milter it would seem.

Revision history for this message
Scott Kitterman (kitterman) wrote :

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?

Changed in dkimpy-milter:
status: New → Incomplete
Revision history for this message
Gene (gene-arch) wrote :

Thank you - versions:

 libmilter: 8.17.1

 pymilter is from git master: 1.0.5.r506.7deec90a

Revision history for this message
Gene (gene-arch) wrote :

The pymilter I'm using is provided by Archlinux.
I note they have one patch to upstream

"fd-passing-libmilter.patch"

as shown here: https://github.com/archlinux/svntogit-community/tree/packages/libmilter/trunk

Doesn't seem related but sharing for completeness.

Revision history for this message
Gene (gene-arch) wrote :

Sorry I meant libmilter in #3 not pymilter.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for dkimpy-milter because there has been no activity for 60 days.]

Changed in dkimpy-milter:
status: Incomplete → Expired
Revision history for this message
Scott Kitterman (kitterman) wrote :

I still don't have any good suggestions for you. Since dkimpy-milter doesn't change the body of the message, I'm reasonably confident there's no we it could be causing this. I'd recommend asking on the postfix-users mailing list for more general troubleshooting.

Revision history for this message
Gene (gene-arch) wrote :

Thanks Scott and no worries - have an awesome weekend.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.