Rewriting Subject line?

David Relson relson at osagesoftware.com
Wed Sep 24 05:04:02 CEST 2003


On Tue, 23 Sep 2003 19:35:19 -0700
p at dirac.org wrote:

> hi shawn,
> 
> if you filter mail using bogofilter (as in ":0f:"), the mail is still
> available for processing in your procmailrc file.
> 
> you can place a recipe after the bogofilter that looks for mail that
> was classified as spam.  you can use formail to rewrite the subject.
> 
> at the very least, you can write your own perl script to do that. 
> write something that takes an email on stdin, looks for
> /^Subject:\W+(.*)$/ before the first blank line, then you can write
> the email out line by line, but you can munge the subject, like print
> "Subject: [[[ SPAM ]]](was: $1)\n";
> 
> pete

Pete,

Take a look in bogofilter.cf.example.  Bogofilter allows you to specify
"spam_subject_tag=...whatever-you-want..." which will include
"...whatever-you-want..." in your Subject line.  It's easier than a perl
script and (probably) quicker as well :-)

David




More information about the Bogofilter mailing list