This isn't what you asked, and maybe there's a reason you can't do it
this way, but SpamAssassin has an option (which can be set per-user)
to rewrite the subject line as desired. Look for the rewrite_header
setting in 3.0 and later.
On Fri, 14 Apr 2006, Brett Charbeneau wrote:
I've scoured the list archives and Google to try and find out what I'm
doing wrong, but I'm left scratching my head. Doh!
I'd be very grateful for any help anyone can find the time to offer.
BACKGROUND: I've got a handful of Outlook users who have individual
SpamAssassin installations on my mail server. I'd like to use a procmail
to run incoming mail through SA and, if marked as spam, alter the Subject line
so that Outlook filters will stick these messages into a specific folder.
Can anyone please tell me how I can get procmail to NOT skip my formail
statment - I'd like it to alter that Subject line and then just plop the
into the user's /var/spool/mail file (their inbox).
Here's the recipe I'm playing with:
* ^X-Spam-Status: Yes
| formail -I "Subject: [Spam?] $SUBJECT"
Here's what the log says on a successful spam detection:
procmail: Assigning "INCLUDERC=/home/mjohnson/Procmail/rc.spam"
procmail: Locking "spamassassin.lock"
procmail: Executing "/home/mjohnson/sausr/bin/spamassassin"
procmail:  Fri Apr 14 10:30:58 2006
procmail: Unlocking "spamassassin.lock"
procmail: Match on "^X-Spam-Status: Yes"
procmail: Skipped "| formail -I "Subject: [Spam?] $SUBJECT""
procmail: Locking "/var/mail/mjohnson.lock"
procmail: Assigning "LASTFOLDER=/var/mail/mjohnson"
procmail: Opening "/var/mail/mjohnson"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/mail/mjohnson.lock"
procmail: Notified comsat: "mjohnson(_at_)2425970:/var/mail/mjohnson"
From genuine_really(_at_)yahoo(_dot_)com Fri Apr 14 10:30:53 2006
Public key #7BBC68D9 at | Shane Williams
http://pgp.mit.edu/ | System Admin - UT iSchool
All syllogisms contain three lines | shanew(_at_)shanew(_dot_)net
Therefore this is not a syllogism | www.ischool.utexas.edu/~shanew
procmail mailing list Procmail homepage: http://www.procmail.org/