Re: [exim] Rewrite FROM address

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Phil Pennock
Dátum:  
Címzett: Luke Sheldrick
CC: exim-users@exim.org
Tárgy: Re: [exim] Rewrite FROM address
On 2008-03-02 at 23:33 +0000, Luke Sheldrick wrote:
> I get the below error when trying to start exim with your excert:
>
> Starting exim: 2008-03-02 23:14:14 Exim configuration error in line 656 of /etc/exim/exim.conf:
> missing rewrite replacement string


That's because you missed out on some spaces and fields.

> using the following syntax under the transporters section
>
> remote_smtp:
> driver = smtp
> headers_rewrite = *@an0key.co.uk${lookup{$local_part@$domain}lsearch{/etc/exim/redir/$1}{$value}fail}@???
> return_path = ${lookup{$local_part@$domain}lsearch{/etc/exim/redir/$1}{$value}fail}


I wrote:

max_rcpt = 1
headers_rewrite = *@an0key.co.uk ${lookup{$local_part@$domain}lsearch{/etc/mail/subaddress-maps/$1}{$value}fail}@??? f
return_path = ${lookup{$local_part@$domain}lsearch{/etc/mail/subaddress-maps/$1}{$value}fail}

(and also mentioned the long lines and wrapping)

Split up with newlines, the second line there is:

  headers_rewrite = *@an0key.co.uk \
     ${lookup{$local_part@$domain}lsearch{/etc/mail/subaddress-maps/$1}{$value}fail}@??? \
     f


So, a space between the match field and the replacement field, then
another space between the replacement field and the 'f' flag.

-Phil