Next Previous Contents

3.13   (procmail) -   Using new mailhost and Spam filtering

Last updated 25 November 2008 (from Joel's notes).

Some people have reported that they are receiving email tagged as SPAM (in the Subject: line) and it's not being sent to their spam folder. This can usually be corrected by running


from the person's account (it has to be run under their login session). setspamfilter essentially does the steps outlined below after copying any existing .procmailrc file to a backup file (just in case there were important recipes in it).

If your .procmailrc file had recipes you want to still use you will need to add the recipe below to it by hand and delete the link to the system's default .procmailrc (used for spam filtering).

If a person wants to receive all their email messages without filtering of SPAM he should send a message requesting that to

These requests may be denied since a potential downside is that forwarding of unfiltered email (not filtered for SPAM) to an off-site account is likely to get NMT blacklisted by outside mail services (and then mail going to them from anybody at NMT would be blocked).


From Bryan L. Hughes, Sat Jan 7 16:22:14 2006
Subject: Mailhost Upgrade, Spam Filtering Changes
From Bryan Dean, Thu Jan 12 09:35:05 2006
Subject: Ticket 20060111095751 has been upgraded. This upgrade provides a new spam filtering mechanism that requires procmail.

A spam file has been created for you in  /fs/administratium/spam/<username>.spam. This is a folder in system space and so does not count against your account's quota. You will find instructions below for linking to this folder from the spam folder you will create in your home directory.

To use the filtering, you will need a procmail recipe that filters mails with the header line:  X-Spam-Flag: YES  to your spam folder.

Note: In the lines below <username> is the name of the account in question.

Follow these steps to activate filtering for your account:

  1. If you already have a .procmailrc file add this procmail recipe to it
             # Catch SPAM
             * ^X-Spam-Flag: YES

    otherwise you can use the default system procmail file for spam filtering by creating a link to it as follows
             ln -s  /etc/spamproc  ~/.procmailrc

  2. Then, create a soft-link to the spam folder that was created for you, using:

    ln -s  /fs/tedium/spam/<username>.spam  ~/<username>.spam
  3. To send tagged spam to your spam folder add the line:


    to the bottom of your .mailboxlist file.

    NOTE: .mailboxlist, is only for IMAP connections where the clients (e.g. SquirrelMail) use IMAP folders. Some clients (like pine and mutt) use their own folders and not .mailboxlist.

More information about the upgrade can be found at:

If you need help setting up your spam filtering please stop by the Help Desk in Speare 5, or call -5584. If you have problems with spam filtering once it has been set up please call the Help Desk, or file a ticket.

Next Previous Contents