procmail
[Top] [All Lists]

Re: Received: headers after From:

1997-11-05 07:29:50
Gary Sutter wrote,

| I think it would be handy to remove all Received: headers that come
| after a From: header.  These seem to me to be universally forged for
| spammers.  On the spam forwarding list, perhaps 60% of the messages for
| the past several days had received: headers forged in this manner.
| 
| I can't think of an easier way than this, though:
| 
| :0
| * From:
| {
|       :0
|       * Received:
|       { ACTION }
| }
| 
| However, it's 1:25 AM and I am not in a good state of mind.  Can anyone
| think of a better way?  Somehow this seems clumsy to me.

If nothing else, you can do this:

 :0
 * ^From:
 * ^Received:
 { ACTION }

If the action is to remove all Received: headers if a From: exists,

 :0fhw
 * ^From:.*[^   ]
 * ^Received:
 | formail -I Received: