Mailing List Archive

Re: [exim] rewriting headers when rewriting yelds unparsable address [possible feature request]
On Friday 11 of January 2008, Arkadiusz Miskiewicz wrote:
> On Friday 11 of January 2008, Phil Pennock wrote:
> > On 2008-01-11 at 09:02 +0100, Arkadiusz Miskiewicz wrote:
> > > Hello,
[...]
> > 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@something.pl "${if def:h_from:{${address:$h_from:}}fail}" Ffs
>
> root@x.pl "${if eq {${address:$h_from:}}{} {fail}{${address:$h_from:}} }"
> Ffs and I get: "Rewrite of root@x.pl yielded unqualified address "fail""
>
> That doesn't work unfortunately.

Isn't this a bug actually?

> > -Phil

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

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
Re: [exim] rewriting headers when rewriting yelds unparsable address [possible feature request] [ In reply to ]
Arkadiusz Miskiewicz wrote:
>>> root@something.pl "${if def:h_from:{${address:$h_from:}}fail}" Ffs
>> root@x.pl "${if eq {${address:$h_from:}}{} {fail}{${address:$h_from:}} }"

Those aren't the same thing. "fail" is a directive instructing expansion
of the if to fail. "{fail}" is the literal string "fail".

- Marc

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##