[exim] Problems receiving mails with multiple domains

Etusivu
Poista viesti
Vastaa
Lähettäjä: Tim Tassonis
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] Problems receiving mails with multiple domains
Hi all

I have problems setting up exim to receive mails for mutliple domains.
My config seems rather straigth forward. The things I have changed from
the default are:


primary_hostname = baros.cubic.ch
domainlist local_domains = lsearch;/opt/exim4/etc/maildomains
domainlist relay_to_domains = lsearch;/opt/exim4/etc/relaydomains
hostlist relay_from_hosts = lsearch;/opt/exim4/etc/relayhosts


I replaced the system_aliases part with the following

virtual_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/opt/exim4/etc/aliases.${domain}}}
user = mail
file_transport = address_file
pipe_transport = address_pipe


in order to have one alias file per domain. For example
/opt/exim4/etc/aliases.wmwette.ch reads:
root: wmwette
info: wmwette

The maildomains file reads:
wmwette.ch
em-wette.ch
meyers-bar.ch

The relaydomains file is empty, the relayhosts file reads:
localhost
baros.cubic.ch
hansen.cubic.ch
henchoz.cubic.ch

Now, when I send from timtas@??? to info@???, I get the
following error:


2006-09-08 17:06:58 1GLhwX-0007R3-WA <= timtas@???
H=hansen.cubic.ch [213.239.196.232] P=esmtp S=963
id=41399.217.162.149.216.1157727220.squirrel@???

2006-09-08 17:06:58 1GLhwX-0007R3-WA remote host address is the local
host: baros.cubic.ch

2006-09-08 17:06:58 1GLhwX-0007R3-WA == wmwette@???
<info@???> R=dnslookup defer (-1): remote host address is the
local host
2006-09-08 17:06:58 1GLhwX-0007R3-WA Frozen


So, my alias file for the domain has been used, as info@??? has
been translated to wmwette@???. However after that, I
expected exim to look for the local account wmwette, instead, it
resolves wmwette.ch to baros.cubic.ch and hangs in the dnslookup check.
If I add baros.cubic.ch to the localdomains, it will go through there
and then fails to find the alias file for baros.cubic.ch. I have no idea
why it seems to do this second run, replacing the domain with
baros.cubic.ch.
It is probably relevant that wmwette.ch resolves to baros.cubic.ch on a
reverse lookup.

Has anyboy got an idea what I've done wrong (or failed to do)?

Below is my full config, stripped of any comment and empty lines.

Bye Tim

primary_hostname = baros.cubic.ch
domainlist local_domains = lsearch;/opt/exim4/etc/maildomains
domainlist relay_to_domains = lsearch;/opt/exim4/etc/relaydomains
hostlist   relay_from_hosts = lsearch;/opt/exim4/etc/relayhosts
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
never_users = root
rfc1413_hosts = *
rfc1413_query_timeout = 5s
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d
begin acl
acl_check_rcpt:
   accept  hosts = :
   deny    message       = Restricted characters in address
           domains       = +local_domains
           local_parts   = ^[.] : ^.*[@%!/|]
   deny    message       = Restricted characters in address
           domains       = !+local_domains
           local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
   accept  local_parts   = postmaster
           domains       = +local_domains
   require verify        = sender
   accept  hosts         = +relay_from_hosts
           control       = submission
   accept  authenticated = *
           control       = submission
   require message = relay not permitted
           domains = +local_domains : +relay_domains
   require verify = recipient
   accept
acl_check_data:
   accept
begin routers
dnslookup:
   driver = dnslookup
   domains = ! +local_domains
   transport = remote_smtp
   ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
   no_more
virtual_aliases:
   driver = redirect
   allow_fail
   allow_defer
   data = ${lookup{$local_part}lsearch{/opt/exim4/etc/aliases.${domain}}}
   user = mail
   file_transport = address_file
   pipe_transport = address_pipe
userforward:
   driver = redirect
   check_local_user
   file = $home/.forward
   no_verify
   no_expn
   check_ancestor
   file_transport = address_file
   pipe_transport = address_pipe
   reply_transport = address_reply
localuser:
   driver = accept
   check_local_user
   transport = local_delivery
   cannot_route_message = Unknown user
begin transports
remote_smtp:
   driver = smtp
local_delivery:
   driver = appendfile
   file = /var/mail/$local_part
   delivery_date_add
   envelope_to_add
   return_path_add
address_pipe:
   driver = pipe
   return_output
address_file:
   driver = appendfile
   delivery_date_add
   envelope_to_add
   return_path_add
address_reply:
   driver = autoreply
begin retry
*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h
begin rewrite
begin authenticators
PLAIN:
   driver                     = plaintext
   server_set_id              = $auth2
   server_prompts             = :
   server_condition           = ${if pam{$2:${sg{$3}{:}{::}}}{yes}{no}}
LOGIN:
   driver                     = plaintext
   server_set_id              = $auth1
   server_prompts             = <| Username: | Password:
   server_condition           = ${if pam{$1:${sg{$2}{:}{::}}}{yes}{no}}