Re: [exim] Router or ACL - Deny all but one domain for speci…

Góra strony
Delete this message
Reply to this message
Autor: Peter Leeman
Data:  
Dla: Chris Siebenmann
CC: exim-users@exim.org
Temat: Re: [exim] Router or ACL - Deny all but one domain for specific IPs
Hi Chris

Thanks for the response, this has worked perfectly, nice and slick, and I have been able to get rid of two smarthost blocks.

Pete.
-----Original Message-----
From: Chris Siebenmann [mailto:cks@cs.toronto.edu]
Sent: 29 June 2016 22:05
To: Peter Leeman
Cc: exim-users@???; cks@???
Subject: Re: [exim] Router or ACL - Deny all but one domain for specific IPs

> To try and make the configuration more efficient I am trying to use an
> ACL to deny senders where the IP address is listed in a file AND the
> 'RCPT to' domain is anything other than 'thisdomain.com'. This ACL
> seems to be blocking all senders if they are listed in the file
> regardless of destination.
>
> The ACL is in the acl_check_rcpt section and is as follows:
>
>   deny
>         condition = ${if and \
>                 {match_ip{$sender_host_address}{net-iplsearch;/etc/exim4/conf.d/tmc-config/relay_from_xerox}} \
>                 {match_domain {$domain}{! thisdomain.com}} \
>                 }


My personal view is that your life will be simpler if you don't try to do this check in a 'condition =' block but instead directly use the ACL verbs that do these checks directly. I think that this would make your ACL here something like:

    deny
        hosts = /etc/exim4/conf.d/tmc-config/relay_from_xerox
        !domains = thisdomain.com
        message = ....


It's much easier to write and test ACL rules that use these features directly instead of slogging through getting the string expansions right.

    - cks


SAVE PAPER - Please do not print this e-mail unless absolutely necessary.


******** The Moray Council: Internet E-mail Notice ********

Moray Council Web address: http://www.moray.gov.uk
Main switchboard: 01343 543451

For details on how Moray Council uses personal information, visit http://www.moray.gov.uk/privacy

The contents of this e-mail and any attachments ('this e-mail') are confidential and intended solely for the addressee.
If this e-mail has been sent to you by mistake, please notify postmaster@??? as soon as possible; you should then delete this e-mail from your computer.