Hi,
I suspect I am missing the obvious here and am fairly certain that I am
suffering from wood for trees syndrome, so apologies in advance for
sounding like an idiot.
I have a whole load of ACLs that work fine for HELO tests, sender
verification etc etc:
deny message = Restricted characters in address
domains = +all_domains
local_parts = ^[.] : ^.*[@%!/|]
log_message = "Restricted characters in address"
deny message = Rejected, $sender_host_address listed
in $dnslist_domain\n$dnslist_text
dnslists = zen.dnsbl.domain.masked
log_message = Found in $dnslist_domain
($dnslist_value) SPAMHAUS-DENY
require verify = sender
log_message = "Unable to verify sender:
$sender_address"
What I want to do is, if the incoming email matches any of our white
lists to be able to selectively bypass selected ACL statements. So for
example if I know that mail is coming in from friendly.host.com (as it
is whitelisted) - which I can match, log and set an acl variable on:
warn senders = +whitelisted_senders
log_message = "whitelisted sender"
set acl_m_whitesender = true
This is straight forward enough.
The bit that has me scratching my head (well banging against a desk
today), is combining the newly set acl variable with an if condition in
an ACL statement later on in order to give control flow.
So for example:
deny message = Rejected, $sender_host_address
listed in $dnslist_domain\n$dnslist_text
condition = ${if !eq
{acl_m_whitesender}{true}}
dnslists = zen.dnsbl.domain.masked
log_message = Found in $dnslist_domain
($dnslist_value) SPAMHAUS-DENY
I know I am probably missing the obvious - but it has been a long day!
Many thanks
Paul