The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Things look quiet here. But I've been doing a lot of blogging at dan.langille.org because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website.

Setting up Spam Bouncer 5 January 2001
Share
Need more help on this topic? Click here
This article has 1 comment
Show me similar articles
Spam Bouncer is a set of procmail recipes, or instructions, which search the headers and text of your incoming email to see if it meets one or more conditions.  The Spam Bouncer home page is http://www.spambouncer.org/ and I've just installed it.  The rest of this article will show you what I did to install it on a FreeBSD box.

I'm not running Spam Bouncer right now.  I did use it for a while, but I didn't have time for the fine tuning which needs to be done after installation.  I'll hopefully come back to that soon.

Things to remember
I use sendmail as my mail transport agent (MTA).  You may not.  If so, you will need to make adjustments to the things you read below.

I use a Windows mail client (Pegasus, it's free and built in New Zealand).  So I have configured everything for use with Pegasus (which is a POP client).  You won't want to follow these instructions if you don't use POP.  If you don't know whether or not you use POP, I suggest you read the Spam Bouncer home page (URL is above).

I will assume you already have procmail installed and working.

Getting Spam Bouncer
You can download Spam Bouncer from http://www.spambouncer.org/spambnc.tar.Z.   Put this file in ~/procmail and untar it:

mkdir ~/procmail
cd ~/procmail
fetch http://www.spambouncer.org/spambnc.tar.Z
tar xvfz spambnc.tar.Z

You can get a sample procmail.rc file from http://www.spambouncer.org/procmail.rc. I used this file for setting up Spam Bouncer.  I saved this file as ~/.procmailrc

I learned how to do this by reading Getting Started With Procmail.

Configuring the sample procmail.rc file
Here are the changes I made to the sample file I downloaded in the previous section.  Don't make these changes without understanding what they mean.  Read the sample file, make your decisions, and adjust accordingly.

This is a directory which must exist.  Make sure you create it.

MAILDIR=${HOME}/Mail

So I created it:

mkdir ~/Mail

And the backup directory:

mkdir ~/Mail/backup

These are the changes to ~/.procmailrc that I made:

This is where my mail is normally delivered by sendmail.

DEFAULT=/var/mail/dan

If you are using Eudora, Pegasus Mail, Netscape, Internet Explorer, or another Windows- or Mac-based POP email program, you will want to make these changes:

ADMINFOLDER=${DEFAULT}
BULKFOLDER=${DEFAULT}
BLOCKFOLDER=${DEFAULT}
SPAMFOLDER=${DEFAULT}

Spam Bouncer will add special headers to the mail message.  You can use this to filter your incoming mail if you are using a POP email client.  Please read this for more information:

http://www.spambouncer.org/#SpecialInstructionsForPOPMail

Change the following to be a valid reply-to address which will be used when sending messages to spammers.  Don't use this example:

ALTFROM=nospam@example.org

What email addresses do you use?
You need to create a list of all the email addresses you use.  This goes into ~/myemail.

Here's how I did that from my /etc/mail/virtusertable file:

grep @ /etc/mail/virtusertable |awk ' {print $1}' > ~/.myemail

But that left some comments in the file:

#
#
#address@somedomain.org

I removed them like this:

grep @ /etc/mail/virtusertable | grep -v ^# | awk ' {print $1}' > ~/.myemail

Check the contents of ~/.myemail before you proceed.

Invoking procmail
Remember, I've assumed you've already configured procmail, but if you haven't see procmail - a simple example for what you need to put in ~/.forward.
Finally
I suggest you run in SILENT mode for a while.  Perhaps a week or two.   Make sure you're not getting false blocks etc.

I was able to get Spam Bouncer running.  Remember that procmail can be CPU hungry.

Share
Need more help on this topic? Click here
This article has 1 comment
Show me similar articles