bayes ignore {spam} tag in subject line

Randy Herban RHerban at GRAMTEL.NET
Tue May 6 21:26:08 IST 2003


> -----Original Message-----
> From: mikea [mailto:mikea at MIKEA.ATH.CX]
> Sent: Tuesday, May 06, 2003 2:53 PM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Re: bayes ignore {spam} tag in subject line
>
>
> On Tue, May 06, 2003 at 03:49:18PM -0400, Bingham, Ryan wrote:
> > I apologize if this is a dumb question but I haven't been
> able to find
> > the answer anywhere.  Is there a way to get Bayes to ignore
> the {spam}
> > tag in the Subject line (without ignoring the entire Subject line)?
> > Alternatively, is there an easy way to remove/replace a text string
> > i.e. {spam} from all the messages in an mbox file?
> >
> > I'd like to have Bayes learn messages in my low scoring
> spam mailbox
> > after I've cleaned out the false positives.
>
> Well, certainly you can use an editor on the mailbox to do
> the vim[1] equivalent of
>
>         :1,999999 s/^Subject: {spam}/Subject: /


I only just saw this message and havn't been tracing this thread, but this
can be done easier on the command line with sed.  Not to discount vi but if
this needs done on mass scale, vi won't work the greatest :o)

Cat mailbox | sed -e "s/^Subject: {spam}/Subject:/" >> mailbox.tmp; mv
mailbox.tmp mailbox

To do on many mailboxes in a directory:
For each in *; do at $each | sed -e "s/^Subject: {spam}/Subject:/" >>
$each.tmp; mv $each.tmp $each; done;

(capitalization is done by outlook, not by me, don't capitalize anything on
the unix shell


Sorry if this is way off track of conversation, but noticed this piece and
figured I'd offer to help ease some pain.

-Randy



>
> where the line numbers are  dependent on the size of the
> mailbox. I think it would be safer to work on a _copy_ of the
> mailbox, rather than on the original, unless it's not needed
> in a pristine state for archival or other purposes.
>
> [1]     emacs users will have their own incantation, and will wave a
>         totally different object as they chant.
>
> --
> Mike Andrews
> mikea at mikea.ath.cx
> Tired old sysadmin since 1964
>



More information about the MailScanner mailing list