Collin's answer to use $LASTFOLDER solves Robert's first problem (though
Robert's code could use some other tweaking), so I'll address the second
one:
| The second problem is procmail insists on modifying the 'From '
| line, no matter what command line switches I have tried. All
| 'From ' lines say the message came from the account that ran
| fetchmail and procmail. I'd like to have the 'From ' lines be
| left alone, or at most update the timestamp.
|
| Any suggestions?
Yes. Stop liking that. It would be a bad thing.
The From_ line should point to the site that readdressed the message, not
back to the original sender. However, it is all right to preserve the old
From_ line in another header field (or in *a* header field, since technically
the From_ line is not a header). For example,
:0fhW
| formail -R 'From ' 'X-Old-Postmark:'
Then after you fetch the message, you can still see the old From_ line's
contents in the X-Old-Postmark: header if you'd like to know them, but the
From_ line itself will correctly point back to the account that redirected
the message.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail