[exim] Re: Conditional address rewriting

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Jürgen Herz
日付:  
To: exim-users
題目: [exim] Re: Conditional address rewriting
Philip Hazel wrote:

> 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.


Ah ok, I understand. You're right when talking about re-writing only in
some copies. I completely missed multiple recipients in my thoughts.

>> 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.


What I want is to rewrite Ffrs only if the mail goes outside of my
network. The snippet above wasn't meant for transport in special but
rewrite generally.

In pseudocode I thought of:
if(reciepent_domain != list_of_my_domains)
rewrite domain with a
else
rewrite domain with b (or don't rewrite at all)

But as I wrote above I missed multi-recipients.

> 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"?


I meant match_domain, if a.s.o. don't seem to work in the source pattern
like
*@${if eq{...}} $somevar Ffrs
The error is always "unknown rewrite flag character '$'"

But maybe It works somehow but I don't know how.

Jürgen