Re: [exim] How to rewrite a local from id

Góra strony
Delete this message
Reply to this message
Autor: Phillip Carroll
Data:  
Dla: exim-users
Temat: Re: [exim] How to rewrite a local from id
OK. My understanding of the command line switches is somewhat weak.
Where the manual says "test it using -brw" I assumed that is all I
needed. That was obviously not enough.

However, it turns out adding -v -bh 127.0.0.1 to the command line got it
to recognize the rewrite rule. Which allowed me to debug my syntax.

After rereading section 31.5, I now understand the wildcarding. This now
works for me:

begin rewrite
apache@* postmaster@$1 Eh


On 11/2/2014 12:42 PM, Phillip Carroll wrote:
> Several PHP scripts on my server send messages where the mail system
> inserts an envelope header from apache@mydomain. I want to replace
> "apache" with "postmaster" everywhere it may appear in a header. The
> manual (exim-html-current) makes this sound trivial.
>
> I have:
>
> begin rewrite
> *apache* {$1}postmaster{$2} Eh
>
> That is it. I have nothing else I want to change.
>
> When exim is run with -C (test config file) -brw apache@???, it
> always returns "No rewrite rules are defined". If the above isn't a
> rewrite rule, then I am totally lost.
>
> I have tried several alternative rules, but no joy.
>
> Any help appreciated.
>