procmail
[Top] [All Lists]

Filtering a Kana system?

2004-05-24 08:40:18
Hi all. Got put on a project at work to setup some kind of spam and junk mail filtering for our Kana mail system, which if you know what Kana is it's used for our helpdesk people to track problems within the company. Anywho, we're receiving an inexhorbinant amount of spam and unwanted garbage like viruses and bounce messages into the box while only seeing maybe 2-3 legit emails a day in there. I've got the procmail recipe you guys helped me build for my own home mail server that works like a charm and has never failed me once. However, I'm not sure if that recipe will work for a Kana mail style system so that we don't accidently filter out valid emails. I'm also going to be implementing Spam Assassin with this as well, but I've got that part covered already in another mailing list. I'm just more or less wondering if anyone here has successfully used Procmail to filter a Kana system before and what you might have used as a recipe.

        Here's my existing recipe as used on my home mail server.

# The ever wonderful logfile
LOGFILE=$HOME/procmail.log

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

# This filters all those pesky bounce messages.
:0:
* ^Subject:.*(virus|infected|undeliverable)
mail/virus-bounces

# This filters all those pesky bounce messages.
:0:
* B ?? (virus|infected)
mail/virus-bounces

# 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/'
}


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>