[Mimedefang] Bodyless messages

Kelson Vibber kelson at speed.net
Tue Dec 2 18:09:42 EST 2003


At 02:38 PM 12/2/2003, you wrote:
>It seems reasonable to bounce mail with no body.  However I don't see a
>simple way to do so.  The best I got so far is to do a '-s' filetest on
>HEADERS and INPUTMSG and diagnose when INPUTMSG is one byte longer, but
>this seems clumsy.  Is there a neater trick?

I vaguely recall something about being able to use features of MIME::Tools 
in filter_begin.  If you can get a count of how many body parts there are 
(that sounds morbid, doesn't it?), you should be able to reject or discard 
anything with zero.

On a similar note, it might also be worth checking for 
multipart/alternative messages where one part is empty.  I see a lot of 
spam with an empty text/plain part attached to a spammy HTML part.


Kelson Vibber
SpeedGate Communications <www.speed.net> 




More information about the MIMEDefang mailing list