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
This is not the requested perl, but a procmail\formail method I find
handy to reduce the number of "Received:" fields:
| 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
-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.