Re: [exim] Not rejecting mail to postmaster in DATA acl?

Top Page
Delete this message
Reply to this message
Author: Marc Sherman
Date:  
To: exim-users
Subject: Re: [exim] Not rejecting mail to postmaster in DATA acl?
David Brodbeck wrote:
>
> Set a variable in the RCPT ACL, then check it in the DATA ACL. Like this:
>
> (in the RCPT ACL)
>   # Don't spam filter a few special addresses.
>   # This sets a variable that is used later, in the data ACL.
>   accept local_parts = postmaster : abuse
>          domains = +local_domains : +relay_to_domains
>          set acl_c2 = true

>
> (in the DATA ACL)
>    # Don't filter if we determined earlier that the mail was for postmaster
>    accept condition = $acl_c2


Thanks, that's working -- though I'm using an acl_m variable as
suggested by Alan, not acl_c, because a postmaster rcpt is a property of
the message, not the connection.

Here's a followup question: for intermediate spam (SA scores between 4
and 20), I'm quarentining the spam into a single folder for the entire
system. I'm doing that with the following router:

spam_quarentine:
driver = redirect
verify = false
condition = ${if >={$spam_score_int}{40}{yes}{no}}
user = msherman
group = msherman
data = "/home/msherman/Maildir/.Spam.Quarentine/"
directory_transport = address_directory

I'd like to avoid quarentining mail addressed to postmaster. The naive
solution I tried was to add:
domains = +local_domains
local_parts = !postmaster

But that doesn't work, because the aliases file maps
postmaster->root->msherman, and when the quarentine router is re-run for
the root address, the message gets quarentined.

Any suggestion there?

- Marc