[Mimedefang] FAQ: FreeBSD and Mimedefang and embedded perl (something for the manpages)

Martin Blapp mb at imp.ch
Thu Mar 23 04:45:36 EST 2006

Hi Everybody,

Maybe you still remember my postings some time ago about embedded
perl and mimedefang in embedded perl mode. I had problems with the filter 
stability and so on.

In the meantime I've resolved this issue. The problem is the way
perl (the one from the FreeBSD ports tree) is compiled. The ports system
does build perl with the system malloc(3), not the internal perl malloc.
The reason for this it seems is that perl malloc has (had ?) problems with
threaded perl on FreeBSD.

But FreeBSD malloc(3) is very picky about errors, also double freeing some
vars. If you have circular dependencies defined in your filter, you
can be almost sure that mimedefang multiplexer will crash.

To fix this issue with embedded perl just recompile perl with WITH_PERL_MALLOC
defined in /etc/make.conf and be sure you recompile also all your perl modules.
p5-Digest-SHA1 for examble will return false checksums if you don't.

Or you carefully check if you include some module twice. There are still some
cases then where your mimedefang multiplexer can crash, but it is better than

Modifing the FreeBSD malloc flags doesn't help at all, the crashes where still
the same.


Martin Blapp, <mb at imp.ch> <mbr at FreeBSD.org>
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: <finger -l mbr at freebsd.org>
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E

More information about the MIMEDefang mailing list