[Mimedefang] filter_multipart stripping forwarded messages from KMail

Kelson Vibber kelson at speed.net
Tue Oct 28 18:25:28 EST 2003


I've noticed that messages forwarded as rfc822 attachments from KMail are 
being stripped out by the default filter_multipart action in 
MIMEDefang.  What was odd about it was that the attachment was called 
"forwarded message" and could in no way trigger filter_bad_filename.

Well, it turns out that filter_bad_filename was not triggering on 
"forwarded message" (which was set as the name field of Content-Type), but 
on the Content-Description field, which KMail populates with the original 
sender's address and the original subject.  And the original sender's 
address ended in .com.

Based on the mimedefang-filter man page, it looks like Content-Description 
is sort of the last-choice filename; if nothing is found in 
Content-Disposition or Content-Type, that field will be used.  Is this a 
standard practice - i.e. will any conforming program check Content-Type and 
Content-Disposition first - or is this just the order in which MIMEDefang 
looks?

If it's standard, it ought to be safe for re_match to only check 
Content-Description if it does not actually find any data in the other, 
preferred fields.

It is possible to work around this by editing the description of the 
attachment, but right now the default behavior of KMail when forwarding 
messages as attachments does not work with the default behavior of MIMEDefang.


Kelson Vibber
SpeedGate Communications <www.speed.net> 




More information about the MIMEDefang mailing list