Re: [Exim] Canonicalizing Addresses

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: John Lawless
CC: Exim List
Subject: Re: [Exim] Canonicalizing Addresses
On Tue, 14 Sep 1999, John Lawless wrote:

>      Thanks.  I think I've got it then as:

>
> local:
> driver = lookuphost
> transport = remote_smtp
> domains = lsearch;/etc/local_hosts.list
> self = local
> gethostbyname


You might like to consider adding no_more to that, as another safety
catch. It will stop any domain that appears in the list but doesn't have
an address from falling through.

> internet:
> driver = domainlist
> domains = !*.internal:^.*\\..*\$
> transport = remote_smtp
> route_list = * mail.isp.net bydns_a
>
> This tries the local network first, reducing the chance of accidental
> internet deliveries. From all the discussion on aliases and new internet
> domains, I added the domains statements to the internet router to stop
> addresses that look like misspelled aliases (no period) or that look like
> misspelled internal addresses (*.internal).


Two comments:

(1) You shouldn't have bydns_a in that router! You *must* use MX records
for delivery to Internet hosts if they exist. There are plenty of
Internet domains that have only MX records - cam.ac.uk is one. I bet you
can't mail to ph10@??? using that router. Change it to bydns.

(2) Whenever I see a regular expression these days, I wonder if it can be
improved. A faster one than yours is

domains = ^[^.]*\\.

which just hunts along for the first period and then stops, saving
wasted effort on long strings.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.