Re: [exim] Limiting incoming connections on a per-domain bas…

Top Pagina
Delete this message
Reply to this message
Auteur: John Robinson
Datum:  
Aan: Odhiambo G. Washington, Steve Sobol, exim-users
Onderwerp: Re: [exim] Limiting incoming connections on a per-domain basis
On 21/09/2006 20:16, Odhiambo G. Washington wrote:
> You could do this in acl_smtp_rcpt. Something like (off the top of my
> head):
>
> 1. Define the hosts (IPs)
>    hostlist  allowed_hosts = 1.2.3.4 : 3.4.5.6/30 : a.b.c.d/NN

>
> 2. Define those domains you want to accept mail for as a domainlist.
>
>    domainlist those_domains = blah

>
>
> Now, at an early stage in acl_smtp_rcpt:
>
>    deny  condition  = ${if match_domain {${domain:$h_to:}}{+those_domains}}
>          !hosts     = +allowed_hosts

>
>
> I am not sure how this will deal with cases where recipient is in the CC
> or BCC though.


Well, you could just
    deny domains = those_domains
         !hosts  = +allowed_hosts


but if I understand correctly, that would also stop accepting mail for
those_domains from any relay_from_hosts or authenticated users, which
may not be the desired effect.

Cheers,

John.