procmail
[Top] [All Lists]

Re: Changing Subject, forwarding to new address

1997-05-15 16:13:00
Era Eriksson suggested to Jill Lampi,

| By definition, if you throw away the original Subject line, you lose
| information. 

| You could instead, for example, preserve any existing Subject: header
| but add a tag in front of it, like so:
| 
|     :0
|     | sed -e '1,/^$/s/^Subject:[      ]*/Subject: [xyz] /' | $SENDMAIL ...

Or more easily, change the -I in Era's first suggestion to -i:

    :0
    | formail -i"Subject: XYZ" | $SENDMAIL $SENDMAILFLAGS 
xyz(_at_)where(_dot_)iam(_dot_)com

That will keep the original subject contents in an "Old-Subject:" header.

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