Re: temporary defer all mail

"Richard.Hall" <[email protected]> Wed, 18 May 2005 21:35:51 +0100 (BST)
Newsgroups gmane.mail.exim.exiscan.user
Message-ID <[email protected]>
Igor,

On Wed, 18 May 2005 [email protected] wrote:

> Hello exiscanusers,
>
>   Is any easy way for temporary (for 5-10 minutes) defer _all_ mail
>   without stopping exim daemon?
>
>   I need reinstall clamav and don't want that our users receive
>   unchecked mail.

Others have commented on the 'defer' that an ACL will do if clamd is down.

However, you might find it useful to be able to have clamd running, eg in
order to test out a new version, without running the risk of Exim passing
it mail before you are ready/happy. I know I do!

I use the following at an appropriate point in my Exim config:-

  # If we are about to invoke the AV package, check that it is available.
  # If it is not available, defer. Hopefully the caller will either
  # (a) try another MX and find one that is available
  # (b) defer and try again later or
  # (c) be a spammer and give up in disgust :-)

  defer    condition   = ${if exists {CFGDIR/AV-defer} {1} {0}}
           message     = System maintenance in progress. Please try later.
           log_message = Anti-virus maintenance

Then just 'touch' the file before taking down clamav.
And remember to 'rm' it again later :-)

HTH,
 Richard