On Sat, 29 Mar 2003, David Saez wrote:
> I'm trying to replace the envelope sender by one extracted from the
> header From: line when the envelope sender is 'apache@???' so I
> configured the remote smtp transport like this:
>
> remote_smtp:
> driver = smtp
> return_path = ${if and { {eq{$return_path}{apache@???}} \
> {def:h_from:} } {${address:$h_from:}}{fail} }
>
> messages received by recipients had the return path set from the
> From: header but bounces, return receipts and vacation messages are
> still sent to apache@??? insted to the address defined in the
> return path. Is there any way to avoid this ?
What bounces? If they are generated by the host to which you are
delivering, they should use the return path that you set.
Or do you mean bounces generated by failed routing on your host? If so,
check out the errors_to router option.
Or consider doing the rewriting when the message arrives, using a global
rewriting rule. Rewriting in a transport is usually used when you want
it to apply only to certain copies of a message (those that use this
transport). If you want it to apply everywhere, a global rewriting rule
is what you need.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.