> -----Original Message----- > From: John P Verel > Sent: Monday, August 18, 2003 1:24 PM [...] > > I do this, use the following, as I prefer to not have [SAtalk] on the > subject line. This recipe strips out the string and sends the message > along to the Spamassassin_talk folder. You can modify it to suit your > taste to eliminate the ******SPAM***** string: > > :0fw > * ^TO_spamassassin-talk > | sed -e '/Subject:/s/\[SAtalk\] //g' > > :0a: > Spamassassin_talk >
There are couple of minor errors in the recipe above: (1) you're filtering the entire message and that may not be what you want to do, (2) the sed pattern doeesn't anchor the subject header to the beginning of the line, will cause some possibly unexpected behavior, when applied to both the header and the message body. The following recipe fixes those problems. :0fhw * ^TO_spamassassin-talk | sed -e '/^Subject:/s/\[SAtalk\] //g' :0a: Spamassassin_talk There is one possible subtle difficulty with this recipe if you want use it in a production environment -- header lines can be folded (continued on multiple lines. Thus, although this may not occur in nature: ^Subject:<cr><lf> ^<sp>[SATalk] Why would anyone split the Subject header? is, I believe a valid subject line (where <sp> is white space). One way to handle this occurrence, might be to use formail: :0 * ^TO_spamassassin-talk { SUBJ=`formail -x Subject: | sed sed -e 's/\[SAtalk\] //g'` :0fhw | formail -I "Subject: $SUBJ" :0: Spamassassin_talk } ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk