Autor: stefano\.sabatini-lala Fecha: A: exim-users Asunto: Re: [exim] Return-path rewriting or removal at transport level
On Saturday 2006-12-16 22:02:11 +0000, David Woodhouse wrote: > On Sat, 2006-12-16 at 19:43 +0100, stefano.sabatini-lala wrote: > > I'm trying to remove the Return-path from all the *outgoing*
> > mails. The following snippet configures my smarthost transport: >
> The Return-path: header is added only by the MTA which finally delivers > the mail into a user's mailbox -- and the value it contains is the SMTP > reverse-path; the address used in the 'MAIL FROM:<...>' command. >
> It's not surprising that some recipients are rejecting your mail, if > you're sending it with bogus return addresses. Investigate
> qualify_domain and rewrite rules and make sure your reverse-paths are > correct.
>
Thank you David for your reply.
Now I see which is my problem.
I would like to rewrite the header From and Envelope From
value for all the outgoing emails, and left unchanged the
emails sent locally to the system.
I can't do this at transport time (I can't rewrite the From
header value but not the Envelope from) and I cannot do this
at router time (because the headers_rewrite options simply
doesn't exist).
Thus the only thing that makes sense is to change it at
rewrite time, but only for the emails sent outside the system.
I would like to apply this rule at rewrite time:
# change the From header value (f) and the From envelope
value (F)
headers_rewrite = *@+local_domains \
"${lookup{${local_part}}lsearch{/etc/email-addresses}
{$value}fail}" fF
but *only for the outgoing emails*, so I should check before
the recipient address, and eventually apply the rewriting rule.
Is it possible (and eventually how)?
PS Sorry for the bad formatting, but I'm currently using a
(painful) web interface for composing mails.