Re: [Exim] need help with smtp-auth and relaying

Top Page
Delete this message
Reply to this message
Author: volker augustin
Date:  
To: Nico Erfurth
CC: exim-users, volker
Subject: Re: [Exim] need help with smtp-auth and relaying
thanks! but im still running into problems, i put the debug output here...

>> hostlist relay_from_hosts = 127.0.0.1
>it's an good idea to add your local ip's here too


ok, i did so...

> helo_try_verify_hosts = *:!local_domains
>This entry is BS in three ways
>1. Exim will abort after the *, because this matches for everything, so
> !local_domains will never be checked
>2. local_domains is a domainlist, so it can't be used if you want to
> check for HOSTS
>3. Lists are given with +listname, otherwise it is an single name


i fixed that

>> ######ACL#######
>> begin acl
>>
 >> acl_check_rcpt:
 >>     accept hosts = :
 >>...
 >>     require verify        = sender
 >First sender verify ^^^^^^^^^


 >>     require message = Sender verify failed
 >>         verify        = sender


>The last one is useless, because it will NEVER be reached, because you
>deny everything that does not match before, further, you did a sender
>verification before


done! i commented out the last sender verify, and put it on another
position if everything is well

>Reorder your routers!
>amavis_router:
>dnslookup:
>virtual_known_local_useralias:
>virtual_user_alias_forward:
>virtual_user_forward:
>virtual_known_local_user:
>virtual_unknown_local_user:
>localuser:


ok, i did so

>I did not check the routers themself, because they are too messy, and
>it's too late ;), but a quick overviews shows, that some could be
>removed, or putted together with another router.


thats right, maybe in the near future i will take a closer look at them

>

volker augustin wrote:

>> domainlist relay_to_domains = pgsql;SELECT domain from domain where
>> aktiv=1 and "local"=0


>do you need the "" around local?


yes i realy need it, because local is a postgresql keyword i have to put
"" around it ;)

>> and i set my relay from hosts list to:
>> hostlist relay_from_hosts = 127.0.0.1


>Add you local ips too.


ok, i did so... but what if a sender fakes his ip as the spammers will do?

>> so, i understand my mistake with the lookup in the domainlists and also
>> the acl stuff makes sense (i dont understand it well, but it may

work *g*)

>Read the docs, again and again and again, until you really know them.
>If in doubt, read them again ;)


>> but if i send a mail through my server to another doman which is not on
>> my server, i got an 'unrouteable address' -error?


>This could be a problem with your ordering of the routers. Try the
>current order, if in doubt, run exim with exim -d and look for the
>output, it's VERY helpfull.


ok, i tried
    exim -d+dns -bt someaddress@???
, this is what the debug output says:


--------> dnslookup router <--------
local_part=kingchaos2002 domain=yahoo.de
checking domains
search_open: pgsql "NULL"
cached open
search_find: file="NULL"
key="SELECT domain FROM domain WHERE aktiv=1 and "local"=1" partial=-1
LRU list:
internal_search_find: file="NULL"
type=pgsql key="SELECT domain FROM domain WHERE aktiv=1 and "local"=1"
database lookup required for SELECT domain FROM domain WHERE aktiv=1 and
"local"=1
PGSQL query: SELECT domain FROM domain WHERE aktiv=1 and "local"=1
PGSQL using cached connection for localhost:5432/mail/mail
lookup yielded: tomcat.multiartstudio.de
tomcat.multiartstudio.net
tomcat.multiartstudio.com
yahoo.de in "@:pgsql;SELECT domain FROM domain WHERE aktiv=1 and
"local"=1"? yes (matched "pgsql;SELECT domain FROM domain WHERE aktiv=1
and "local"=1")
yahoo.de in "!+local_domains"? no (matched "!+local_domains")
data from lookup saved for cache
dnslookup router skipped: domains mismatch
no more routers
kingchaos2002@??? is undeliverable:
Unrouteable address
search_tidyup called
close PGSQL connection: localhost:5432/mail/mail
>>>>>>>>>>>>>>>>>> Exim pid=21234 terminating with rc=2 >>>>>>>>>>>>>>>>>>


why does it match my local_domains list?

-->> yahoo.de in "@:pgsql;SELECT domain FROM domain WHERE aktiv=1 and
"local"=1"? yes (matched "pgsql;SELECT domain FROM domain WHERE aktiv=1
and "local"=1")

thanks for any suggestions...

volker



Try again....

> another question:
>
> does it make sense to set
> domains = !+local_domains : !+relay_to_domains
> in the dnslookup-router??



Nope, (at least not in most cases) if you are a backup mx for the
relay_to_domains the dnslookup router just tries to send the mail to the
primary mx. If you have a destination that is "behind you", and there is
no primary mx record that you could send the mail too, you need a
manualrouter, to say "hey, mails for this domain to this mx please".

>
> dnslookup:
> driver = dnslookup
> domains = ! +local_domains
> transport = remote_smtp
> ignore_target_hosts = 127.0.0.0/8


add :0.0.0.0 here

> no_more
> ##############
> > the lookup;-syntax is more like a command, it means "do the lookup if
> > you reach this, if i get a good response, this is fine for me"
> you mean i results in something like 'true' and 'false'?



mostly, yes