UCLALUG

Main - Linux? - Help & Docs - Software Downloads - About Us

Anti-Spam Software on the UCLA Linux Users Group Server

Purpose

As it has grown, the UCLA LUG has experienced ever-increasing quantities of unsolicited email (commonly called spam). As a result, the administrators have installed software that attempts to recognize spam in the email system (for those interested, we are using Spam Assassin). The software marks the headers of these messages but otherwise does not interfere with delivery of email.

Some email software is capable of filtering or sorting incoming mail based on these markings. This page describes the markings, how to use them with one popular peice of email software, and answers some simple questions.

IMPORTANT: the UCLA LUG strongly advises its users NOT to drop email based on the spam-recognition software. See the question on accuracy below.

If you have a question regarding the use of anti-spam software  on the UCLA LUG server that is not answered on this page, please send your question to admin@linux.ucla.edu.

Table of Contents

How is this useful?

How accurate is the spam-recognition software?

How do I use the spam-recognition software?

Will the software block any of my emails? (Are you absolutely sure)

Can I use this with "whitelist" software

Why isn't it working


How is this useful?

The markings associated with the recognized spam can be used along with email filtering software to sort or block (i.e. not receive at all) the email.
Return to the Table of Contents

How accurate is the spam-recognition software?

The spam-recognition software has been over 90% accurate. This means that some email may be improperly classified as spam. For this reason, the UCLA LUG strongly advises its users NOT to drop email based on the spam-recognition software.
Return to the Table of Contents

How do I use the spam-recognition software?

The spam-recognition software adds a field in the header called 'X-Spam-Status'. This field will be set to 'Yes' if the email is considered spam. It is possible to use this information along with your email filtering program(s) of choice to then either drop or sort the email. If your favorite email software is procmail, read on.

To use the spam-recognition software with Procmail follow the directions below.
Add the following to the top of your .procmailrc to catch spam in a mail folder:
:0:
* ^X-Spam-Status: Yes
caughtspam


Add the following to the top of your procmailrc to block spam (this is not tested, and not recommended):
:0:
* ^X-Spam-Status: Yes
/dev/null

Will the software block any of my emails?

Not unless you explicitly configure procmail (or your favorite filter software) to drop emails.

Are you absolutely sure?

Yes. Absolutely.
Return to the Table of Contents

Can I use this with "whitelist" software?

The short answer is unsurprising: it depends. Depending on what whitelist software you want to use, the answer is yes.

The following is a whitelist configuration for procmail should work properly on our server. If you use fetchmail or other mail systems this may not work directly. At the top of your .procmailrc, before the spam rule mentioned above, insert the following rule:

:0:
* ? formail -x"From:" -x"From" -x"To:" -x"Reply-To:" -x"Cc:" \
| egrep -is -f $HOME/.email_whitelist
$DEFAULT
If you know that email arriving for a certain email address has an especially high concentration of spam (you may have multiple email addresses either due to mail forwarding you have arranged or if you have a mail alias configured), you could use the following procmail rule to direct that email into your spam folder:
:0:
* ^TO .*foo@bar\.baz.*
$MAILDIR/caughtspam
Note the use of metasyntactic variables to denote the email address you are expecting spam to be sent to. Or, if you wish to have a strict whitelist configuration, remove the " * ^TO .*foo@bar\.baz.*" line and have all non-whitelist email arrive in your spam directory. Return to the Table of Contents

Why isn't it working?

Be sure there are no empty lines in your procmailrc. In certain cases, procmail uses a blank line to imply that a matching email is accepted. Please check the procmail FAQ before reporting any configuration problems to var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));