Re: [exim] replace Received: from

Pàgina inicial
Delete this message
Reply to this message
Autor: Victor Gras
Data:  
A: exim-users
Assumpte: Re: [exim] replace Received: from
Kjetil Torgrim wrote:

> why call it X-Received?


it was just as an example of something to identify messages allowed to
do this thing.

> you should not remove Received headers, these are used to stop mail
> loops. typically, when you reach 30 Received headers it will no longer
> be forwarded, so the loop stops. but since you remove all of those
> headers, the loop will continue forever.
> you'll get such a mail loop sooner or later, in the simplest case
> joedoe@yourdomain will forward to jonathan.doe@otherdomain, then forget
> about it and set up forwarding back to joedoe@yourdomain. that's all it
> takes for your bandwidth and CPU to be gobbled up.


well, in my case it is not a global politic for everybody but just an
option to hide the IP user in special accounts and neither for massive
mailing. Then I did not think in such forwards or in saturate the
queue. Just I think in answering some messages knowing that my
receiver cannot know if I'm in the office or not.

In the case that you explain, when I add an additional "Received: "
instead "X-Received:" and replacing the user IP with 127.0.0.1:

remote_smtp:
  driver = smtp 
  headers_remove = Received:X-Special-Header
  headers_add = ${if eq{$h_X-Special-Header:}{MYHEADER }
         {Received: from [127.0.0.1] (helo=$sender_helo_name)\n\t \
         by $primary_hostname with $received_protocol\n\t \
         ($tls_cipher) (Exim $version_number #$compile_number)\n\t \
         id ${message_id} for $h_to } \
         {Received: from $sender_rcvhost\n\t \
         by $primary_hostname with $received_protocol\n\t \
         ($tls_cipher) (Exim $version_number #$compile_number)\n\t \
         id ${message_id} for $h_to }}



also in dependence of X-Special-Header, a final "Received from:"
will be added at the final headers to preserve references and hiding
the user's IP. It would be more polite adding the header before the
From: To:. Maybe it is possible with a large replacement in all
headers to rebuild his appearance. However I don't need such thing
when it already works for my needs.

With # tail -f /var/log/exim_mainlog, I don't observe any loop testing
a reciprocal forwarding as you explain. Messages are dispatched and
received normally.


best regards,