[Exim] one domain, two delivery servers, loops and optimisat…

Top Pagina
Delete this message
Reply to this message
Auteur: Marc Haber
Datum:  
Aan: exim-users
Onderwerp: [Exim] one domain, two delivery servers, loops and optimisation thoughts
Hi,

I have a director that says:

|unknown:
|  debug_print    = "D: unknown for $local_part@$domain from $sender_host_name"
|  domains        = example.com
|  condition      = "${if eq {${lc:$sender_host_name}}{mx.example.com}{0}{1}}"
|  driver         = smartuser
|  transport      = unknown
|  verify         = no


This has been taken from the FAQ (Q0403); the condition (which I will
comment about later) added.

I would like to know whether the two conditions "domain" and
"condition" are giving any overhead when they are done separately, or
if it would be a better idea to include the domain check in the
"condition" expression since I have one anyway.

This is taken from this setup:

mx.example.com is the MX for example.com. Under example.com, we have
mail addresses for staff and customers. This is legacy, and it has
been decided by management that we won't change any e-mail addresses -
neither staff nor customers. So we have to cope with this IMO broken
setup technically.

Until now, we delivered staff and customer e-mail on the same machine.
This is to be separated now.

We built staff-mail.example.com and customer-mail.example.com.
mx.example.com has a list of staff mail addresses and uses these
routers to route e-mail for example.com to the correct delivery
machine:

|example_com_staff:
|  debug_print = "R: example_com_staff for $local_part@$domain"
|  domains     = example.com
|  local_parts = lsearch;CONFDIR/example_com_staff
|  transport   = remote_smtp
|  driver      = domainlist
|  route_list  = "* staff-mail.example.com bydns_a"

|
|example_com_customers:
|  debug_print = "R: example_com_customers for $local_part@$domain"
|  domains     = example.com
|  transport   = remote_smtp
|  driver      = domainlist
|  route_list  = "* customer-mail.example.com bydns_a"


staff-mail.example.com and customer-mail.example.com both have
example.com as a local domain and they also have an "unknown" director
like given above after their localuser director. Thus, undeliverable
e-mail generated locally (for example, e-mail to a staff member
generated on customer-mail) is sent to MX for proper routing.

This takes proper care of e-mail routing and directing, iff
CONFDIR/example_com_staff is correct.

So we have to worry about mail loops for mail addresses that are in
CONFDIR/example_com_staff but not in staff-mail's user list, and for
mail addresses that neither are in CONFDIR/example_com_staff nor in
customer-mail's user list. Mail to such addresses would loop between
mx and the server that mx thinks is responsible for that address.

I _think_ that having the unknown director on staff-mail and
customer-mail send e-mail to mx _only_ if it hasn't come in from there
(believing that if mx has sent a message to the local host once it
would do so a second time anyway) solves the loop problem and causes a
bounce to be issued without mail being looped. Did I miss something
here?

Any hints will be appreciated.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29