Re: [Exim] local_domains doesn't always work

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Kevin Reed
Datum:  
To: exim-users
Betreff: Re: [Exim] local_domains doesn't always work
Jeff Lasman said:
> in the thread RBL chcking only for incoming messages Kevin Reed wrote:
>
>> deny message = $sender_host_address is listed at $dnslist_domain
>>      hosts = !+local_domains
>>      dnslists = list.dsbl.org : \
>>          sbl.spamhaus.org : \
>>          bl.spamcop.net : \
>>          relays.ordb.org : \
>>          korea.services.net : \
>>          china.blackholes.us : \
>>          russia.blackholes.us

>
>
> I've tried this and it doesn't work; I get this error every time exim
> tries to run this acl:
>
> <snip>
> 2003-12-24 20:05:11 SMTP connection from [199.169.208.132] (TCP/IP
> connection co
> 2003-12-24 20:05:11 unknown named host list "+local_domains"
> </snip>


You have no list of "hosts" defined as +local_domains ... that is a
domainlist, not a hostlist.

>
> Yet local_domains is properly defined; this is line 40 from my
> /etc/exim.conf file:
>
> <snip>
> domainlist local_domains = lsearch;/etc/virtual/domains
> </snip>


This is defining a domainlist, not a hostlist so it works for domains
checks, but not hosts checks.

>
> And it's used in my check_recipient acl:
>
> <snip>
> check_recipient:
>   # Exim 3 had no checking on -bs messages, so for compatibility
>   # we accept if the source is local SMTP (i.e. not over TCP/IP).
>   # We do this by testing for an empty sending host field.
>   accept  hosts = :
>   accept  domains = +local_domains
>   accept  domains = +relay_domains
>   accept  hosts = +relay_hosts
>   accept  hosts = +auth_relay_hosts
>           endpass
>           message = authentication required
>           authenticated = *
>   deny    message = relay not permitted
> </snip>


Above you are using +local_domains in domains... Not hosts.

> Any idea why this would work in one acl, yet not in another? Is
> something perhaps changing it on the fly?


You are mixing apples and oranges.

You can't define a domainlist and then use it as a hostlist.

Define a hostlist like:

hostlist exempt_lookup_hosts = /path_to_file/exempt-lookup-hosts

see the difference from what you are using:

domainlist local_domains = lsearch;/etc/virtual/domains

Now you can use..

deny message = $sender_host_address is listed at $dnslist_domain
    hosts = !+lexempt_lookup_hosts
    dnslists = list.dsbl.org : \
        sbl.spamhaus.org : \
        bl.spamcop.net : \
        relays.ordb.org : \
        korea.services.net : \
        china.blackholes.us : \
        russia.blackholes.us


--
Kevin W. Reed - TNET Services, Inc.
Unoffical Exim MTA Info Forums - http://exim.got-there.com/forums