Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

control flow in ACLs

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


paul.osborne at canterbury

Feb 16, 2012, 8:17 AM

Post #1 of 3 (203 views)
Permalink
control flow in ACLs

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

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


paul.osborne at canterbury

Feb 16, 2012, 9:13 AM

Post #2 of 3 (195 views)
Permalink
Re: control flow in ACLs [In reply to]

Forget that last message.

A cup of tea, a sit down and doing something else does wonders.

:)

Paul


> -----Original Message-----
> From: paul.osborne [at] canterbury
> [mailto:paul.osborne [at] canterbury]
> Sent: 16 February 2012 16:18
> To: exim-users [at] exim
> Subject: [exim] control flow in ACLs
>
> 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
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


john.horne at plymouth

Feb 16, 2012, 9:16 AM

Post #3 of 3 (198 views)
Permalink
Re: control flow in ACLs [In reply to]

On Thu, 2012-02-16 at 16:17 +0000, paul.osborne [at] canterbury wrote:

> condition = ${if !eq {acl_m_whitesender}{true}}
^
Your variable should have a '$' before it.



John.

--
John Horne Tel: +44 (0)1752 587287
Plymouth University, UK Fax: +44 (0)1752 587001

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.