On Sat, 6 Sep 2003 12:11:13 -0700 [EMAIL PROTECTED] wrote: > RH9 with kernel 2.4.20-19.9, spamassassin-2.44-11.8.x via procmail > > Using Linux Bible and recipes I googled, I'm trying to set up SpamAssassin to > tag and redirect spam into the user's ~/mail/SPAM file, which I created. I've > tried the following, but spam is still getting passed through even though > SpamAssassin correctly tags it. Because I'm not 100% certain what needs to be > restarted whenever you alter /etc/procmailrc (can someone say?) I've been > rebooting to test each change.
Yow! Rebooting after changing /etc/procmailrc is a bit excessive. I doubt you need to restart anything after changing that file. You might need to reload or restart your MTA but I doubt it. > I need to make this work with emacs's RMAIL. I also tried redirecting > incoming spam to /dev/null, in case there's something quirky about RMAIL. > > First, I put in /etc/procmailrc: > > :0fw > | /usr/bin/spamc This looks good. I use: :0fw: spamc.lock * !^X-spam-status:[ ]*Yes * < 100000 | /usr/bin/spamc -d localhost -p 783 -u apthorpe This uses a local lockfile, avoids processing mail already tagged as spam (my backup MX runs SA in site-wide mode from the MTA), and avoids processing mail over 100000 lines long (spamc should avoid handling mail over 250k.) The flags passed to spamc are the defaults (connect to the spamd daemon on localhost:783, and use my prefs) and aren't necessary. The lock file (the ': spamc.lock' part of ':0fw: spamc.lock') keeps you from invoking more than one spamc at a time to keep load down. > And in the user's ~/.procmailrc, I tried: > > :0: > * > X-Spam-Flag: YES > $HOME/mail/SPAM Put the '*' and the pattern on the same line. Procmail is archaic, picky, and weird and you have to cater to its whims. Try something like this: :0: * X-Spam-Flag: YES SPAM [...] > I get the same results every time: correctly tagged spam that doesn't > get redirected. How do you make SA redirect? Make procmail happy. :) Also, considering adding: DROPPRIVS=yes to your .procmailrc for safety and use VERBOSE=YES LOGFILE=$HOME/procmail.log during testing to see what procmail is doing (vs what you think it's doing.) Check the man pages for procmailex and procmailrc if you get too stuck. hth, -- Bob ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk