How to Use Full Featured SpamAssassin on Pair.com Hosted Accounts
1250 Views, 1 Favorites, 0 Comments
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.
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.
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
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
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
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
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
#We would blacklist domains like
blacklist_from *.macys.com
#that would block all emails from macys
Log in to My.pair.com
Log in to my.pair.com.
Go to email management
Go to email management
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.
Create a Recipe
Create a recipe for your domain.
Click on create new recipe.
Click on create new recipe.
Recipe
type the name of the account, then choose filter.
Recipe
Enter /usr/local/bin/procmail as the E-mail Filter.
Select Create Filter
Select Create Filter
Done
You are done, you can try sending some test mail and tailing the log file. But you should be good now.
-Joe
-Joe