[Mimedefang] mimedefang-multiplexor crash

Marcus Schopen lists at localguru.de
Fri Sep 2 08:23:00 EDT 2011

Hi Ghislain,

Am Donnerstag, den 01.09.2011, 23:51 +0200 schrieb Kees Theunissen:
> On Thu, 1 Sep 2011, Ghislain wrote:
> >hi,
> >
> >    i have from time to time a mimedefang-multiplexor crash. The
> >mimedefang process is still here but mimedefang-multiplexor is down.
> >Each time we have a :
> >
> >  kernel: mimedefang[10760]: segfault at 130 ip 00007faef285c900 sp
> >0000000042c200f0 error 4 in libmilter.so.1.0.1[7faef2851000+f000]
> >
> >(debian lenny 64 bits)
> >
> >  I wonder how we could debug this and have an automatic way to restart
> >the system when it triggers. The startup script of debian does not have
> >a "status" command i could use for this and using a dumb "mimedefang
> >start" do not work as it see the mimedefang process and think that all
> >is ok and not down so it does not start. Of course a restart could not
> >be used as if it work then restarting will kill performances especialy
> >every 30 minutes ^^.
> >
> >
> >   Any idea on how to prevent this ?
> As I wrote in my other reply in this thread I think this is the bug
> reported at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=527862 .
> Message #47 in that thread mentions a patch that can be downloaded
> from http://j-chkmail.ensmp.fr/libmilter .
> The "debian-lenny/" directory at that site contains patched libmilter
> debian packages for "Lenny".

I built these debian packages with Jose-Marcio's patch last year and
since then my milters are running rock stable. The debian packages is
only 32bit. For building the patch on your own:

install the following helper packages: 

  aptitude install debhelper fakeroot m4 cdbs patchutils dh-buildinfo
groff libdb4.6-dev libldap2-dev libwrap0-dev liblockfile-dev
libsasl2-dev libssl-dev procmail

download sendmail latest package source package:
  aptitude source sendmail

download workes.c.patch from
and modify the frist two lines to let the package builder find the

--- sendmail-8.14.3/libmilter/worker.c		2007-12-03 23:06:05.000000000
+++ ./debian/patches/8.14/8.14.3/worker.c.patch	2009-06-15
09:46:29.000000000 +0200

copy workes.c.patch to sendmail-8.14.3/debian/patches/8.14/8.14.3

modify sendmail-8.14.3/debian/changelog, e.g.:

sendmail (8.14.3-5+lenny1.localguru.0) stable-security; urgency=high

  * Fixed segfault in libmilter (Closes: #527862)

 -- Marcus Schopen <marcus at localguru.de>  Sat, 06 Mar 2010 02:07:11

rebuild the sendmail package


install the new libmilter package:

  dpkg -i libmilter1.0.1-dbg_8.14.3-5+lenny1.localguru.0_i386.deb

  The filename suffix "localguru.0" depends on your changes in

restart sendmail and your filters

> I didn't test/use those packages as I'm running Debian Squeeze.
> A quick and dirty workaround is inspecting the mail-logs and restarting
> mimedefang in case of errors.
> Something like:
>    tail -n100 /var/log/mail.log | \
>    grep -q 'Milter (mimedefang): to error state' && \
>    /etc/init.d/mimedefang restart
> frequently run by cron should do the job (not jet tested).
> The regular expression in the grep command is based on my logs after
> the last crash a few weeks ago.

Check monit for watchdog functionality.


More information about the MIMEDefang mailing list