Re: [EXIM] Address rewriting and DNS

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Craig Foster
CC: exim-users
題目: Re: [EXIM] Address rewriting and DNS
On Wed, 11 Mar 1998, Craig Foster wrote:

> I'll try
> to explain what I'm attempting...
>
> Nothing unusual, just configuring exim for a mail hub. It'll be
> handling, for example, mail for ion, ion.le, ionospheric-physics,
> ionospheric-physics.leicester, ion.le.ac.uk etc. All of our
> local mail domains have a long and short form like this. Now, I
> see that I could use a table lookup in a rewrite rule to fully
> qualify all local addresses...
>
> ion:ion.le.ac.uk
> ionospheric-physics:ionospheric-physics.leicester.ac.uk
> news:news.le.ac.uk
>
> then use another table with the domainlist router to determine the
> host to route to and the hostname lookup policy, eg.
>
> ion.le.ac.uk $domain bydns_a
> ionospheric-physics.leicester.ac.uk ion.le.ac.uk bydns_a
>
> (localhost is an MX for ion, hence bydns_a).
>
> However, I think I could do away with the first table if
> I could use the DNS for get fq domains at the rewriting stage.
>
> Am I just making things too complicated? Any advice gratefully
> received.


That all looks exceedingly complicated. If are going to make use of the
DNS, things are much easier if you can use the lookuphost router, which
is the main router that routes using the DNS. It has got a
"widen_domains" option which can help with unqualified domain names. If
you set, for example, widen_domains = le.ac.uk:leicester.ac.uk:ac.uk
it would probably get most of the unqualified domains as "right" as it
could.

A possible other approach is to use rewriting to rewrite everything into
a single form. For example, rewrite all unqualified domains by something
like

^[^@]+@[^.]+$ $local_part@${lookup{$domain}dbm{/some/file}{$value}fail}

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
*** Exim information can be found at http://www.exim.org/ ***