On Sunday 09 February 2003 10:58 am, Derek Jennings wrote:
> On Sunday 09 Feb 2003 3:59 pm, Dennis Myers wrote:
> > On Sunday 09 February 2003 05:39 am, Derek Jennings wrote:
> > > On Sunday 09 Feb 2003 5:12 am, Dennis Myers wrote:
> > > > I want spamassassin to log or put mail that it thinks is spam in a
> > > > folder in my kmail setup. I have given the command "spamassassin
> > > > --log-to-mbox=Spam" in a console but it doesn't seem to be doing the
> > > > job. Should I have used the -l switch first or just how does one get
> > > > it to filter and send to a particular folder? TIA for any help or
> > > > suggestions.
> > >
> > > The way I do it is to use a procmail recipe like this :-
> > >
> > >
> > > JUNKMAIL=/home/derek/Maildir/.junkmail/
> > > #Run SpamAssasin
> > >
> > > :0fw
> > > :
> > > | spamassassin -a -P
> > > |
> > > :0e
> > >
> > > {
> > >    EXITCODE=$?
> > > }
> > >
> > > :0: $LOCKFILE
> > >
> > > * ^Subject:.*\*\*\*\*SPAM\*\*\*\*
> > > $JUNKMAIL
> > >
> > >
> > > This recipe will pipe a mail through spamassassin. Any positive mails
> > > will have their 'Subject' line modified, and the recipe then puts all
> > > mails with modified subject into a spam mailbox.
> > >
> > > Alternatively if you use Kmail, you can configure filters to run
> > > spamassassin for you. This is explained in the spamassassin
> > > installation notes. You may find it at
> > > /usr/share/doc/spamassassin-2.41/INSTALL
> > >
> > > derek
> >
> > This would be fine except I have no idea what or which regular expression
> > to use. I have little to no programming experience.  Is your next to last
> > line in script above the regular expression you use for filter? Thanks
> > for your patience
>
> Dennis. I see from your Email header you are using Kmail. So the simple way
> to get Spamassassin going is :-
>
> 1/ Settings>ConfigureFilters
>
> 2/ Click on 'New Filter' button (bottom left above 'Help') Highlight the
> new filter and use the 'Up' button to move it to the top of the list.
>
>
> 3/  Select 'Match all' , In the first row of drop down options select '<any
> header>',  'matches regular expression',  and in the right hand box just
> put '.'  (without the quotes)   (All mails will match this regex, so
> everything gets piped through spamassassin)
>
> 4/ Set Filter Actions 'pipe through' 'spamassassin -Pa'  (without quotes)
>
> 5/ Create another filter below the last one. Set
> 'Subject', 'contains', '***SPAM***'   (without quotes)
> Filter Action 'Move to Folder', 'Junkmail'  where Junkmail is a mail folder
> you previously created.
>
> derek
Thanks Derek, that was exactly what I needed. Who knew that "." was a regular 
expression?  I don't seem to get much spam from any source, maybe once a 
month, but I know that sooner or later it will come. Your help is 
appreciated.  So much to learn, so little time.  :  )
-- 
Dennis M.  linux user # 180842

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to