Re: [exim] Re: Conditional address rewriting

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Jürgen Herz
CC: exim-users
Betreff: Re: [exim] Re: Conditional address rewriting
On Wed, 8 Mar 2006, Jürgen Herz wrote:

> Yes, that's a way to do it. But it's not only complex but also error
> prone. It requires to split existing smtp and maildrop transports
> together with their routers that are the same besides one condition in
> the router.


The only way to do re-writing in some copies of a message but not in
others is to do the rewriting in the transport. This is because Exim
holds only one copy of a message, however many recipients it has. The
general rewriting applies to that one copy, and so applies to all
recipients. You have to split the message if you want different
rewriting rules.

> Exim is very flexible, but here it fails at a not allowed if
> match_domain{$domain}{+local_domains} in the source pattern.


The value of $domain will not be set in a transport unless *all* the
addresses that are being handled at one time by that transport have the
same domain. However, I'm afraid I don't think I quite understand what
you are saying here; match_domain should work anywhere an expansion
string is permitted. What is the error message you get for "not
allowed"?


-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book