Re: no_mbox_unspool on errors only?
Tom Kistner <[email protected]> Sat, 25 Sep 2004 15:18:17 +0200
| Newsgroups | gmane.mail.exim.exiscan.user |
|---|---|
| Message-ID | <[email protected]> |
Scott Call wrote:
> What I would like to be able to do is if the test condition is defered,
> I want to keep the file around, but if it succeeds I want to drop it. I
> can't save 200,000 messages a day just in case one fails.
>
> If there's a way to do this in the existing implementation, please let
> me know, otherwise if it's not too hard, can I request it as a feature?
You could do it like this (check the comments):
[...]
# Check malware, continue on "defer"
warn malware = */defer_ok
set acl_m0 = 1
# When $acl_m0 is set here, there is either
# a virus, or there was defer due to an error.
# In the former case, $malware_name must be
# set, in the latter, it is unset.
deny message = Contains virus ($malware_name)
condition = $acl_m0
condition = $malware_name
warn message = Error while scanning
condition = $acl_m0
!condition = $malware_name
control = no_mbox_unspool
control = freeze
[...]
This assumes you do not use $acl_m0 for other purposes.
/tom