[Mimedefang] right value for MX_MAXIMUM

Steffen Kaiser skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Wed Jun 24 09:03:38 EDT 2015

Hash: SHA1

On Wed, 24 Jun 2015, Muthu N.C wrote:

> I am having the system with sendmail, mimedefang and spamassassin.
> Mimedefang is running with the below options.
> -m 2 -x 80 -y 0 -U defang -b 300 -l

that means queueing is off.

> In a day I am getting the below error multiple times. By looking at
> the md-mx-ctrl rawstats, all the 80 slaves are busy at that time. We
> are receiving around 500 e-mails in a minute.

that are 6.25 messages per slave per minute.

> mimedefang-multiplexor[2500]: No free slaves
> mimedefang[2517]: t5O6odRs007105: Error from multiplexor: error: No free slaves
> How much slaves should be set for this workload?

Set as much as your server can handle in parallel. That's the whole point. 
If you handle 300 messages in parallel and the server (esp. spamassassin) 
starts swapping, you gain nothing.
Also, each message is copied into your mimedefang spool directory in a 
working directory. You need about twice the size of the maximum message 
size per message. In order to be bullet proof, you would require
80 * 2 * max message size
in your temp space.

> Would increasing the MX_QUEUE_SIZE help, how much I can increase?

Re-read the man page:
+ incoming connections are queued up (if no free slave exists, yet)
+ if one slave becomes free, the next connection from the queue is 
immediately fed to it

This will smooth peaks of incoming messages a bit, by delaying the 
processing of later ones, instead of drop the connection right away. This 
also means, that the number of open connections to sendmail and the number 
of sendmail processes increases, because their connection is held open.

So, yes, enabling this option might help you.

> Any other suggestions to overcome this issue?

Lower the processing time. :-)

If you have peaks of incoming messages, you will see this error now and 
then anyway. Do you often get mass mails for your users? I had such 
problem with a sibling MTA sending personalized mass mails (one message 
per recipient) in parallel with no limit at all. All available slots of 
Mimedefang where taken up and no other sender got a chance to drop a 
message. I have therefore limited the number of simultaneous connections 
per client in sendmail. Since the sender's admin limited the number of 
outgoing connections to 1, their mass messages are deliviered quicklier 
then before.

> I read that the e-mails sent during this time would be retried by the
> other MTA automatically, but I am seeing it as lost.


- -- 
Steffen Kaiser
Version: GnuPG v1


More information about the MIMEDefang mailing list