Q5036

Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions
Clone this wiki locally

Q5036

Question

Can I make Exim stop accepting inbound emails when the queue gets above some maximum number of emails?

Answer

There is no configuration setting which will do this, however you can do this with a macro and an ACL stanza.

# Global macro
QUEUE_SIZE_MAX = 1000

# Put in rcpt or predata ACL so sender and recipient are logged
defer   set acl_c_queue_size = ${run {/usr/sbin/exim -bpc}}
        condition            = ${if gt{$acl_c_queue_size}{QUEUE_SIZE_MAX} {yes}{no}}