[Mimedefang] uuencoded messages kill my mimedefang slaves

Mark Costlow cheeks at swcp.com
Fri Mar 21 19:38:54 EDT 2008

I'm using Mimedefang 2.63 on FreeBSD 6.2, with MIME-Tools-5.425

I'm using this script to block unknown recipients for some downstream
MXs that I front-end:


Sometimes slaves die like this:
Mar 20 01:06:24 ame2 mimedefang-multiplexor[72716]: Slave 6 stderr: uu decoding: no begin found
Mar 20 01:06:24 ame2 mimedefang.pl[73106]: Clearing handles.
Mar 20 01:06:24 ame2 mimedefang.pl[73106]: bye bye.

This results in a message deferral:

Mar 20 01:06:24 ame2 sm-mta[88134]: m2K76NjM088134: Milter: data, reject=451 4.3.2 Please try again later

I found that *any* message with uuencode data would cause this error.  In
fact, a message consisting of nothing but "begin 600 image.pdf" is sufficient
to cause the problem.

The "uu decoding: no begin found" error happens in decode_it() in
[PERL-LIBRARY]/MIME/Decoder/UU.pm.  I put some debug in there and determined
that the $in parameter is being passed as a string name of a temp file,
instead of an open filehandle.

I put an ugly hack in decode_it() to open the input file.  That allowed
decode_it() to finish successfully, but then:

mimedefang-multiplexor: Slave 4 stderr: Out of memory during request for 
mimedefang-multiplexor: Slave 4 stderr: 4084 bytes, total sbrk() is 
mimedefang-multiplexor: Slave 4 stderr: 66859008 bytes!
mimedefang-multiplexor: Slave 4 died prematurely -- check your filter rules

So something is still wrong after decode_it() finishes.  At his
point I decided to try avoiding the uudecoder altogether and added
a filter_create_parser() with $parser->extract_uuencode(0) (instead
of the default extract_uuencode(1)).  That is working around the
problem successfully.

This works for me for now since I'm only doing the recipient check in
Mimedefang and don't need the bodies decoded.  But I'm planning to
use Mimedefang for content filtering bodies in the future, so I'll need
to resove this problem first.

I haven't tracked down where decode_it() is being invoked.  Does anyone have
any idea where that is?  Any other pointers?


Mark Costlow    | Southwest Cyberport | Fax:   +1-505-232-7975
cheeks at swcp.com | Web:   www.swcp.com | Voice: +1-505-232-7992

abq-strange.com -- Interesting photos taken in Albuquerque, NM
                   Last post: Antenna Farm - 2007-08-26 23:03:43

More information about the MIMEDefang mailing list