procmail
[Top] [All Lists]

Alter subject line and then resend - eeek!

2006-04-14 08:18:48
Gentlefolks,

        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 script 
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 
message 
into the user's  /var/spool/mail file (their inbox).
        Here's the recipe I'm playing with:

:0fw: spamassassin.lock
| /home/mjohnson/sausr/bin/spamassassin
:0e
{
   EXITCODE=$?
}
:0
* ^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: [15109] 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
  Subject: Test
   Folder: /var/mail/mjohnson                                               4428


-- 
********************************************************************
Brett Charbeneau
Network Administrator
Williamsburg Regional Library
7770 Croaker Road
Williamsburg, VA 23188-7064
(757)259-4044          www.wrl.org
(757)259-4079 (fax)    brett(_at_)wrl(_dot_)org
********************************************************************


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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