Re: [exim] transport to another smtp

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Phil Pennock
Dátum:  
Címzett: Stan Novogroudski
CC: exim-users
Tárgy: Re: [exim] transport to another smtp
On 2006-03-01 at 14:10 +0100, Stan Novogroudski wrote:
> I'll have a list of mail adresses, which have to be redirected to
> another smtp's
>
> -------------------
> #File /etc/mail/exim/redirects
> mail@???    another-smtp-ONE.my-domain.foo
> mail2@???    another-smtp-THO.my-domain.foo
> -------------------


> Need I just a router to handle this ?


Yes, because you're doing something to handle a message, so a Router is
used.

> Have somebody solution for my problem ?


Assuming that you want to keep the Left-Hand-Side the same, then you
just need to use smtp with manual routing.

I'm restricting it to +local_domains because I suspect that you only
want to do this for local emails, so there's no need to do a file lookup
for every remote address; if this is not the case, then just remove the
"domains" restriction.

Untested, treat with caution:

smtp_redirect_local:
driver = manualroute
transport = remote_smtp
domains = +local_domains
condition = ${lookup {$local_part@$domain} lsearch*@{/etc/mail/exim/redirects} {yes}{no}}
route_data = "* ${lookup {$local_part@$domain} lsearch*@{/etc/mail/exim/redirects}}"

--
I am keeping international relations on a peaceable footing.
You are biding your time before acting.
He is coddling tyrants.
-- Roger BW on topic of verb conjugation