[Mimedefang] No free slaves and high CPU usage

Jan-Pieter Cornet johnpc at xs4all.nl
Thu Jul 3 04:17:05 EDT 2008


On Thu, Jul 03, 2008 at 09:43:19AM +1000, Chris Henderson wrote:
> One of my mail servers is showing heavy load for the last few weeks.
> When it's under heavy load, sendmail stops working for a few seconds
> and when the load goes down, sendmail comes back to normal
> automatically. This happens 2-3 times every hour, 24 hours. This
> server is the same as far back as I can remember and nothing has
> changed anywhere. When the server is under heavy load I get this
> message:
> 
> "mimedefang[6136]: [ID 669130 mail.warning] mfconnect: No free slaves:
> Need 1, found 0"
> 
> Under /var/spool/MIMEDefang I can see around 26710 directories that
> starts with  "mdefang-m<random_numbers_and_characters>" - most of
> which are empty.

That's bad. I suggest you shut down sendmail, then delete all those
mdefang-* directories, and restart sendmail again (if you want to
be thorough, also shut down mimedefang, and recreate the
/var/spool/MIMEDefang directory itself, because it likely grew
quite big).

Also - if your /var/spool/MIMEDefang is not on a RAM disk, I want to
urge you to store it on RAM disk. There is nothing stored there that
needs to survive a reboot, and it makes your machine perform a LOT
faster.

> Is this something that is causing high CPU usage on my system? Can I
> delete these directories?

Likely, yes.

> I don't have much experience with mimedefang & friends. I want to
> increase the MAX_SLAVES parameter but not sure where to configure it.

Note that you should only increase MAX_SLAVES when you have memory to
spare. Check with "top" and "ps" that all slaves will actually fit in
memory. If you start swapping, you're usually worse off than if you
have a lower MAX_SLAVES limit.

Also - consider using some standard RBL lists, to reject some mail
as early as possible. You can add them to mimedefang if you know enough
perl and dare to change the supplied filter, or you can follow the
instructions in the "ANTI-SPAM CONFIGURATION CONTROL" section of
the sendmail (in the README in the cf/ directory, sometimes called
cf.README).

I'd suggest using zen.spamhaus.org and list.dsbl.org to block all
IPs listed in those DNSBLs.

-- 
Jan-Pieter Cornet <johnpc at xs4all.nl>
!! Disclamer: The addressee of this email is not the intended recipient. !!
!! This is only a test of the echelon and data retention systems. Please !!
!! archive this message indefinitely to allow verification of the logs.  !!



More information about the MIMEDefang mailing list