Introduction
On January 31st, 2005, SEASnet began rejecting spam from known
"black-listed" sources. Any site that has been "black-listed" by
one of the major sites tracking this activity will be prevented
from sending email to all domains managed by SEASnet (seas, ee,
ea, icsl, and nanolab). All senders of email rejected by SEASnet
will receive a notice stating their mail has been rejected and
an explanation why. They are given an address to contact if they
believe their email is valid and should not be blocked.
Any spam that continues to arrive can be reduced further by
personal mail filters such as Procmail and Spamc as noted below.
How to filter SPAM with .procmailrc and spamc
Note: see instructions below on converting
spamassassin to spamc if you are already running spamassassin
- Create a razor directory by running the following command:
/usr/local/bin/razor-admin --create --discover
You may need to run this command a couple of times for it to actually
work. You can tell if it's working as it takes it a few minutes to
create the directory.
- Create .procmailrc file in your home directory as shown in
the sample .procmailrc file.
- If you specified LOGFILE in your .pocmailrc file, an entry
will be appended for each incoming message in the LOGFILE that you specified.
You may monitor the filtering activity by reading the LOGFILE.
- The messages considered SPAM by spamassasin will be saved in the
caughtspam folder in your Mail directory. If you receive many
SPAM, the caughtspam folder may get very big, so please check and
delete the messages in caughtspam folder occasionally.
- The option file, .spamassassin/user_prefs, is created
automatically when you first receive email once you have .procmailrc
file set up with spamassasin. Do not create this file manually.
- In the .spamassasin/user_prefs file, the required_hits is set
to 10. Each message header will show X-Spam-Level such as X-Spam-Level:
****. If you want to adjust the number of hits before a mail is
considered spam, you may choose to set it to a different number in your
.spamassassin/user_prefs file. The lower the number the lower the
number of hits it takes for spamassassin to consider the message to be
spam.
- If you want to add your own filtering commands to your .procmailrc
file, add them after the spamassassin section but before the vacation
section. Here are some sample commands.
- Please see How to set up vacation message in the
sample .procmailrc file.
|
How to convert spamassassin to spamc
- Increase your spam threshold to 10 (or at least double it).
Your spam threshold is located in ~/.spamassassin/user_prefs and
is referred to as "required-hits"
- Edit your .procmailrc and disable spamassassin by commenting out
the lines that invoke it.
- Create a razor directory by running the following command:
/usr/local/bin/razor-admin --create --discover
You may need to run this command a couple of times for it to actually
work. You can tell if it's working as it takes it a few minutes to
create the directory.
- OPTIONAL: If you are using bayes you will need to convert
your existing bayes data to the new format. Run the following
command:
/usr/local/bin/sa-learn-new --import
If you are running an automatic script to learn spam, change your
script to use sa-learn-new instead of sa-learn.
- Edit your .procmailrc and change
/usr/local/bin/spamassassin
to
/usr/local/bin/spamc
and uncomment the invocation lines. Spamc is a lightweight front end
for spamassassin that invokes spamd which runs on the mailserver. Spamd
is always running so you don't have to pay the overhead of launching
perl and loading all the modules that spamassassin uses for each
message. It just spans a fresh copy for you (fork) and away it goes.
- Make sure you monitor your procmail log and caughtspam folder to be
sure that things are working correctly. When you become more comfortable
with the new version you can decrease the spam threshold.
|