Re: [exim] rewriting headers when rewriting yelds unparsable…

Pàgina inicial
Delete this message
Reply to this message
Autor: Arkadiusz Miskiewicz
Data:  
A: exim-users
CC: Phil Pennock
Assumpte: Re: [exim] rewriting headers when rewriting yelds unparsableaddress [possible feature request]
On Friday 11 of January 2008, Phil Pennock wrote:
> On 2008-01-11 at 09:02 +0100, Arkadiusz Miskiewicz wrote:
> > Hello,
> >
> > I have few rewriting rules that apply to the same address:
> >
> > root@???      "$h_from:"                Ffs
> > root@???      "ups@???"   Ffs

> >
> > Now first rule fails because of:
>
> Don't you want "${address:$h_from:}" ?


That gives me:

Rewrite of root@??? yielded unparseable address: empty address in
address

and no other rewrite rules are tried.

12:21:06 18367 expanding: $h_from:
12:21:06 18367    result: x@??? <x@???>
12:21:06 18367 expanding: ${address:$h_from:}
12:21:06 18367    result:


>
> Exim quite happily uses multiple rules but you need to avoid giving it
> bad rules. However, you can fail the expansion to force it to continue;
> The Exim Specification, 31.6, "Rewriting replacements":
>
> ----------------------------8< cut here >8------------------------------
>                                  If the expansion is forced to fail by the
> presence of "fail" in a conditional or lookup item, rewriting by the
> current rule is abandoned, but subsequent rules may take effect. Any other
> expansion failure causes the entire rewriting operation to be abandoned,
> and an entry written to the panic log.
> ----------------------------8< cut here >8------------------------------

>
> So yes, you can do:
>
> root@??? "${if def:h_from:{${address:$h_from:}}fail}" Ffs


root@??? "${if eq {${address:$h_from:}}{} {fail}{${address:$h_from:}} }" Ffs
and I get: "Rewrite of root@??? yielded unqualified address "fail""

That doesn't work unfortunately.

> -Phil


-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/