procmail
[Top] [All Lists]

Re: Removing duplicate header components

1999-02-15 06:14:25
Jim Osborn <jimo(_at_)eskimo(_dot_)com> writes:
I've recently run into a situation that's got me puzzled.  A list
I subscribe to adds its own Reply-to: header line, but leaves a
poster's RT line there as well, if he adds one.  I'd never seen
a list server that did that, but there it is.  I've been using

You should email the list maintainer and inform them that the list
server is generating messages that violate the mail message standard
(they are "discouraged" in rfc822 while the revision currently being
worked on disallows their generation).  Someone should contact the
maintainer and have them fix it.


the recipe below to reorganize the header components I want to
keep, and duplicate header lines, in the incantation below, get
concatenated, with a newline between, which splits the resulting
header at that point.  No good.

I'd been deleting gratuitous to-list RT lines with:

:0 fwh
* ^Reply-to: <list-posting-addr(_at_)listaddr(_dot_)com>
| formail -I Reply-To:

but that deletes ALL RT lines, and sometimes an author may actually
have an interesting RT line, distinct from his From: line, and I'd
like to preserve it.

Anyone know of a good delete-just-the-first-header-line recipe?

How about:

        # If there is more than one Reply-To: header, keep the last one.
        :0 fhw
        * ^Reply-To:(.*$)+Reply-To:
        |formail -UReply-To:


Philip Guenther

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