Re: [Exim] Address rewriting

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Sascha Runschke
CC: exim-users
Tárgy: Re: [Exim] Address rewriting
On Mon, 22 Apr 2002, Sascha Runschke wrote:

> My current approach looks like that:
>
> sascha@??? "${if match
> {${lc:$received_for}}{c1\-spielerouttime\@yahoogroups\.de} {Karl-Heinz Rade
> <Karl.H.Rade@???>}fail}" wf
>
> In words:
>
> if From: equals "sascha@???"
>  if To: equals "c1-spielerouttime@???"
>    then rewrite From: as "Karl-Heinz Rade <Karl.H.Rade@???>"
>  else bail out

>
> I'm not entirely sure if $received_for is the correct
> variable to check at all, but afaik is $h_to: not available
> during address-rewrite, or is it?


The "f" flag is for rewriting the From: header. That means it can only
happen after the header has been read, so that the From: header line is
available for rewriting. Guess what? The To: header is also available,
so you can use $h_to: if you want.

However, $received_for is NOT what you want. (a) It is set only if the
message has exactly one recipient. (b) It is set only during the
expansion of received_header_text.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.