i do something similar to what you're trying, namely, fetchmail off of
several accounts, and then spamassassinate it before delivering it to my
final clean mailbox.

so, it's fetchmail --> procmail --> mbox
[snip]

Yep, already doing something similar to that. Here's the recipe I'm using. I also have one of these in each user directory. That's the part that's just baffling the heck out of me. IT works for the main user megos, but not for any accounts that are forwarded. I also have procmail setup as the MTA (not sendmail directly) and all works fine. But only if mail is delivered locally. That's the part that's driving me nuts. If it gets forwarded, I don't get any spam filtering.

# SpamAssassin sample procmailrc
#
# Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
# if you use the spamc/spamd combination)
#
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
#
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.
#
:0fw: spamassassin.lock
* < 800000
| /usr/local/bin/spamc

# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
mail/spam

# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to "probably-spam".
:0:
* ^X-Spam-Status: Yes
mail/spam

# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped.  This will re-add it.
:0
* ^^rom[ ]
{
  LOG="*** Dropped F off From_ header! Fixing up. "

  :0 fhw
  | sed -e '1s/^/F/'
}

# This addition filters viruses
:0 fhw
* B ?? ^Content-type: (audio|application)
* B ?? name=.*\.(com|exe|bat|scr|pif|hta|shs|vb[es]|ws[fh])\>
* Subject: *\/.+
mail/viruses



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to