Re: [Exim] Flexible Static Routing

Pàgina inicial
Delete this message
Reply to this message
Autor: Vincent Danen
Data:  
A: Harald Meland
CC: Terry.Shows, exim-users
Assumpte: Re: [Exim] Flexible Static Routing
--
On Thu Aug 14, 2003 at 10:31:31PM +0200, Harald Meland wrote:

> > staticroute:
> >   driver = manualroute
> >   domains = ! +local_domains
> >   transport = remote_smtp
> >   route_list = *.braindeath.dtdns.net braindeath-smtp.dtdns.net:1200;\
> >                *.tomdp.com braindeath-smtp.dtdns.net:1200;\
> >                *.steeplejack.ca 199.xx.xx.xx

> >
> > I'm not sure what's wrong. First, I don't know if I can specify an
> > arbitrary port in this way; I think exim may be thinking 1200 is an
> > alternate host to deliver to, but I didn't see anything in the specs
> > about ports.
>
> I suspect you'll have to do tricks with the 'port' setting on the
> _transport_ to contact non-standard remote ports.


That does the trick.

> > However, that's not my immediate problem. Exim seems to skip over
> > this router and go straight to the dnslookup router, which has me
> > confused. If I do a "exim -bt joe@???"
>
> Note that '*.steeplejack.com' will not match 'steeplejack.com',
> because of the '.' preceding 'steeplejack'. The spec says, in section
> 'Domain lists':
>
>    * If a pattern starts with an asterisk, the remaining characters of
>      the pattern are compared with the terminating characters of the
>      domain. The use of `*' in domain lists differs from its use in
>      partial matching lookups. In a domain list, the character
>      following the asterisk need not be a dot, whereas partial matching
>      works only in terms of dot-separated components. For example, a
>      domain list item such as `*key.ex' matches "donkey.ex" as well as
>      "cipher.key.ex".

>
> My guess is that the thing works if you instead do 'exim -bt
> joe@???'.
>
> You can solve this by either
>
> * Doubling the entry, e.g.
>
>      route_list = steeplejack.com host1:host2 ; *.steeplejack.com host1:host2 ; ...

>
> * Using a regex instead of an leading asterisk pattern:
>
>      route_list = ^(.*\.)?steeplejack\.com$

>
>    (No guarantees that I've used the correct number of backslashes in
>    there, though...)


Didn't try the regexp... for right now, I'm not worried about that. I'll
play with that a little later. I did remove the leading .* and it works
now.

For the archives, this is what I've got now:

staticroute_steeple:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = steeplejack.ca xx.xx.xx.xx

staticroute_tom:
  driver = manualroute
  domains = ! +local_domains
  transport = remote_highsmtp
  route_list = braindeath.dtdns.net braindeath-smtp.dtdns.net;\
               tomdp.com braindeath-smtp.dtdns.net;\
               braindeath.be braindeath-smtp.dtdns.net


...

remote_highsmtp:
driver = smtp
port = 1200

Works great.

I'm sure there is an easier way to do it without having two smtp transports,
but this works and I'm happy.

Thanks!!

--
MandrakeSoft Security; http://www.mandrakesecure.net/
Online Security Resource Book; http://linsec.ca/
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FE6F2AFD : 88D8 0D23 8D4B 3407 5BD7 66F9 2043 D0E5 FE6F 2AFD}

--
[ Content of type application/pgp-signature deleted ]
--