procmail
[Top] [All Lists]

Re: Re-write outbound Received: mail headers

2005-11-29 16:25:08
J Moore:
Ruud:

If all that has to be changed in the message, is that particular
Received header field, I would choose sed, even without procmail.

Great idea :) But you're going to have to tell me how to connect sed
to sendmail.

Since procmail is already active on your outbound mail, stick to that.


Do you need to pickup the domain and [A.B.C.D] from the one-newer
Received-header, or is that static information?

All I need to pick up is: 'fw.domain1.com [E.F.G.H]'


# Capture the machine name from the
# top (=newest) Received header field:

  :0
  * ^Received:[^(]+\(\/[^ ]+
  { HOST1 = $MATCH }  # 'fw.domain1.com'


# Capture the machine name + IP-nr from the
# 2nd Received header field:

  :0
  * ^Received:.*^Received:[^(]+\(\/[^)]+
  { HOST2 = $MATCH }  # 'root(_at_)smtp(_dot_)domain2(_dot_)net [A.B.C.D]'


First test those on an actual message, and show us the verbose log.


I looked at the code in the file 'snr_demo.rc'... but there were no
comments, so I had trouble understanding it :). I will figure that out
if you'll confirm that is the code you referred to above.

Let's try sed first.

-- 
Grtz, Ruud


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail