Actually it's alot easier to do the following: [ assuming you are doing this for yourself and not for the entire machine: ] - Use fetchmail to get your mail and deliver it locally to your MTA - Use procmail (forward it via your .forward file) and run spamc or spamassassin on each incoming mail. Now the mail is marked up with X-Spam-Status: as a header which you can use evo to filter (rule based) out and read the rest. I read-in the mail, if its got a really high score I just dump it out and deal with it later, then I read in the regular mail folder with evo and my first rule is that if X-Spam-Status: Yes then move it to a spam folder which you can review for any false-positives. So far I have no false-positives, and 1-3 spams that get through, but with the new 2.5 bayes filters I have down to 1 every other day. Aram P.S. Here are my .fetchmailrc, .forward, and .procmailrc files: .fetchmailrc: #------------- set postmaster "awm" set properties "" set daemon 5 poll mail.isp1.com with proto POP3 user 'awm' there with password 'password' is 'awm' here poll mail.isp2.com with proto POP3 user 'amirzade' there with password 'password' is 'awm' here #------------- .forward: "|exec /usr/bin/procmail" .procmailrc: SHELL = /bin/sh MAILDIR = $HOME/Mail LOGFILE = _logfile VERBOSE = no LOGABSTRACT = all PATH = /bin:/usr/bin:/sbin:/usr/sbin # # If the mail is larger than 255k than skip spamassasin :0fw: spamassassin.lock * < 256000 | /usr/bin/spamc # # Move very large spam out before I see it :0: * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\* caughtspam On Fri, 2003-03-07 at 21:29, Jack Veenstra wrote:
Has anyone gotten SpamAssassin (an excellent tool for filtering out spam) to work with Evolution? There seem to be two approaches: 1. Run "spamassassin -e" from an Evolution filter using the "Pipe Message to Shell Command" and checking if it "does not return 0". If this condition is met, then you can move the message to a folder called "spam". This has the disadvantage that spamassassin won't be able to rewrite the message headers. It is useful to see the spamassassin message headers because it gives the "score" for the spam and the reasons why that message is considered spam. 2. Another approach is to setup your .forward and .procmailrc files to run spamassassin automatically when mail is received. Then spamassassin will rewrite the message headers of spam (this is what I want). I haven't been able to get this to work, however. I've read a lot of examples on the web and copied them to my .procmailrc file but I can't get it to work. It's as if nothing is marked as spam (even for test messages that are definitely spam). Has anyone gotten this to work? When do the commands in the .forward file get invoked? Does Evolution have to be aware of the .forward file (and parse it and run commands)? Or does that happen in some other process? Currently I have Evolution set up to read my mail out of a remotely mounted file (using the "Local Delivery" setting). I would like to change that to fetch my mail using IMAP, but I have had problems getting that to work. How are the commands in the .forward file executed under those two mechanisms (mbox file vs. IMAP)?
-- Aram Mirzadeh <awm fnol net>
Attachment:
signature.asc
Description: This is a digitally signed message part