[CentOS] OT: procmail recipe question

Mon Feb 2 15:55:23 UTC 2009
Paul Bijnens <Paul.Bijnens at xplanation.com>

On 2009-02-02 16:45, James Pifer wrote:
> 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 at 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?


Add the "f" flag to your recipe, to indicate the receipt is a filter,
and not a destination.

  :0 f
  ...rest or recipe...

-- 
Paul Bijnens