Re-Routing AOL Mails

Adam Davis ald at dovienya.net
Sat Jun 21 05:25:44 CDT 2003


On Fri, 20 Jun 2003, Hanasaki JiJi wrote:

> Running exim 4.1.x here with the following in the router section.  Thoughts?
>
> smart_route:
>          driver = manualroute

Ah-hah!  That manualroute driver that I can't use ;)

>          domains = ! +local_domains
>          transport = remote_smtp
>          ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
>          no_more

This seems odd.  It says no more rules are to be examined.  Hopefully
you've dealt with everything that doesn't meet your condition in routers
before this...?

>          no_verify
>          no_expn

>From the Exim 4.2 Specification:

The no_verify and no_expn options mean that this router is skipped when
verifying addresses, or when running as a consequence of an SMTP EXPN
command.

http://www.exim.org/exim-html-4.20/doc/html/spec_7.html

You might further explore that file on practical uses of those functions.
They're not really necessary here, but they don't hurt anything.

>          condition =
> ${lookup{$domain}partial-lsearch{/etc/exim/isp_route.lst}{true}{false}}

Here's my understanding of this condition:

First, it is searching for domain within the isp_route.lst file.  This
file should contain lines with key (domain) followed by data.  Ie:

aol.com:  :true:

>From Exim 4.2 Specification:

Partial matching is requested by adding the string ``partial-'' to the
front of the name of a single-key lookup type, for example, partial-dbm.
When this is done, the subject key is first looked up unmodified; if that
fails, ``*.'' is added at the start of the subject key, and it is looked
up again. If that fails, further lookups are tried with dot-separated
components removed from the start of the subject key, one-by-one, and
``*.'' added on the front of what remains.

>          self = pass

This forces passing to the next router... Hm.  Why bother with the
combination of this and no_more?

>          route_list = * smtp-server.kc.rr.com bydns

This says what to do with anything passed to this router.  Same deal as
what existed in mine.

The first is a condition, of sorts.  My router had aol.com.  *, obviously,
matches anything.  smtp-server.kc.rr.com is the server to route mails to.
bydns is one of two methods I've seen listed to look up the name.  It
looks up IP addresses based on DNS records.  The other is byname, which
uses gethostbyname() to determine IP addresses.

The use of bydns makes me curious.  You don't really have to state an
option.  If you don't, the default is used.  Why force the dns query?

Basically, this rule parses the isp_route.lst file to determine which
hosts are to be sent to the Road Runner server.  It seems like a good way
to do it, if you're going to have a lot of hosts that you need routed and
you don't want to modify Exim's config file and restart each time you get
a new one.

I'm guessing (hoping) this is functional.

~Adam Davis




More information about the Kclug mailing list