procmail
[Top] [All Lists]

Re: help trimming received headers?

1997-11-04 19:59:47
On Tue, 4 Nov 1997, W. Wesley Groleau x4923 wrote:
One of my wishes (as opposed to necessities) is to automatically get rid
of a lot of received headers that are really just clutter.  Every piece of
mail I get has a minimum of five of these headers AFTER it gets past our
firewall.

This is not the requested perl, but a procmail\formail method I find
handy to reduce the number of "Received:" fields:

:0 fw
| formail -zu"Received:

The above will dump all "Received:" lines except the last, which is
the first one inserted. This is usually the more relavent one. From
the manpage: 

        -u      Make the first occurrence of this field unique, and
                thus delete all subsequent occurrences of it.

        -U      Make the last occurrence of this field unique, and
                thus delete all preceding occurrences of it. 

David Hunt


<Prev in Thread] Current Thread [Next in Thread>