Introduction: How to Use Full Featured SpamAssassin on Pair.com Hosted Accounts

Picture of How to Use Full Featured SpamAssassin on Pair.com Hosted Accounts

I host a domain or two on pair.com. They have great hosting features such as an SSH shell, mysql, php support and more.

They don't however have a full fledged SpamAssassin install. They have a weird stripped down version that only lets you add blacklists and whitelists. You have no way to create custom filters.

This will show you how to install your own local copy of SpamAssassin, use procmail to process the messages, and filter your email through your local SpamAssassin install.

Step 1: Install Spamassassin

To install spamassassin you can do this:
wget http://opensource.become.com/mirror/apache/spamassassin/source/Mail-SpamAssassin-3.2.5.tar.gz
tar -zxvf Mail-SpamAssassin-3.2.5.tar.gz
cd Mail-SpamAssassin-3.2.5
perl Makefile.PL PREFIX=$HOME
make && make install

Step 2: Procmail Setup

Set up procmail:
vi ~/.procmailrc
:0fw: spamassassin.lock
| /usr/home/YOUR_USER_NAME/bin/spamassassin

:0:
*X-Spam-Flag: Yes
/usr/home/YOUR_USER_NAME/mail/spam

# enable logging
LOGFILE=/usr/home/YOUR_USER_NAME/procmail.log

Step 3: Set Up Spamassassin Rules

Picture of Set Up Spamassassin Rules

Set up a few simple spamassassin rules in .spamassassin/user_prefs

#We would blacklist domains like
blacklist_from *.macys.com
#that would block all emails from macys

Step 4: Log in to My.pair.com

Picture of Log in to My.pair.com

Log in to my.pair.com.
Go to email management

Step 5: Default

Picture of Default

Make sure your default pair.com account is set to discard all email. I was getting 400+ spams a day to that account when I was not throwing it out.

Step 6: Create a Recipe

Picture of Create a Recipe

Create a recipe for your domain.
Click on create new recipe.

Step 7: Recipe

Picture of Recipe

type the name of the account, then choose filter.

Step 8: Recipe

Picture of Recipe

Enter /usr/local/bin/procmail as the E-mail Filter.
Select Create Filter

Step 9: Done

You are done, you can try sending some test mail and tailing the log file. But you should be good now.

-Joe

Comments

About This Instructable

794views

1favorite

License:

Bio: I like to tinker with just about anything, sometimes it works out in the end. Have fun looking at the projects, try tearing something open ... More »
More by joe:Intel Edison Garage Monitor and Alert SystemIntel Edison Fat Bike Tire AnalyzerIntel Galileo Garage Monitor
Add instructable to: