Skip to content
Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions

Q0625

Question

I wish to have large emails go out one at a time.

Answer

One possibility is to set up a router that defers all large messages, except in queue runs. Since queue runners deliver just one message at a time, if you limited the number of simultaneous queue runners to 1, you would get the effect you wanted. A suitable router might be

defer_if_large_unless_queue_run:
  driver = redirect
  condition = ${if or{{queue_running}{<{$message_size}{200K}} }{no}{yes}}
  allow_defer
  data = :defer: too large for immediate delivery
  no_verify

Of course, this would always delay any large message until the next queue runner, but if you run them fairly regularly, this shouldn't be a huge problem, and may even be desirable. Note the use of no_verify to ensure that this router is not used when Exim is verifying addresses.


Clone this wiki locally