I'm trying to use procmail and I'm having trouble getting it to set some headers. I have one mailing list that sets Newsgroups: in the header and I want to remove it. I have the following test recipe:
:0 * ^Subject:.*<testing * ^(Mime-Version:|Content-) | formail -IMime-Version: -IContent-
If I understand it correctly, it should remove the Mime-Verion and Content headers.
The recipe gets matched but then doesn't deliver correctly:
procmail: Match on "^Subject:.*<testing" procmail: Match on "^(Mime-Version:|Content-)" procmail: Executing "formail,-IMime-Version:,-IContent-" procmail: Assigning "LASTFOLDER=formail -IMime-Version: -IContent-" procmail: Notified comsat: "test@:/home/jep/formail -IMime-Version: -IContent-"
From jep@obrien-pifer.com Mon Feb 2 11:43:03 2009
Subject: testing Folder: formail -IMime-Version: -IContent- 1010
It looks like it's trying to put it in a folder starting with formail. I tried putting the mail file on the next line (/var/mail/test), which is the same way I do it on my kid's procmailrc's, but it seems to ignore it. Where does procmail get the LASTFOLDER thing from?
Anyone know what I'm doing wrong?
Thanks, James