Re: [exim] testing transport time rewriting

Pàgina inicial
Delete this message
Reply to this message
Autor: Ross Boylan
Data:  
A: exim-users
CC: ross
Assumpte: Re: [exim] testing transport time rewriting
On Fri, 2005-10-07 at 06:54 -0700, Ross Boylan wrote:
> I just attempted a transport time rewrite that caused a mail loop, so
> I'm looking for advice on how to test such things safely.
>
> I believe exim -brw doesn't capture transport rewrites. Though I'm
> less sure, I suspect that -N doesn't run the transport at all.
>
> The particular problem was that the rewrite produced a bad sender.
> When the mail was refused, this produced a notification message. When
> the notification went out, it had a bad sender, and so on.
>
> I tried to rewrite with
> *@iron.psg.net $1@${read_file{/etc/mailname}}
> but this produced
> MAIL FROM:<*@iron.psg.net\n @biostat.ucsf.edu>
> and a complaint about an unbalanced <.
>
> Thanks.
>

To answer part of my own question, I specified
return_path as a rewrite specification, but it's not. I'm now using

  headers_rewrite = *@iron.psg.net $1@???
  return_path = ${if eq{${domain:$return_path}}{iron.psg.net} \
    {${local_part:$return_path}@???}{$return_path}}


Does that look OK? Is there a more elegant solution?
In particular, I'm not sure how that will behave with empty return paths
(error bounces).