Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 2004 08:23:51 -0500
From:      Clint Gilders <techservices@onlinehobbyist.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Spam Assassin?
Message-ID:  <401514E7.2060608@onlinehobbyist.com>
In-Reply-To: <200401252021.19637.ecrist@adtechintegrated.com>
References:  <200401242251.14708.ecrist@adtechintegrated.com> <3.0.5.32.20040125170203.01e45de0@10.0.0.15> <200401252021.19637.ecrist@adtechintegrated.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Here's how I have spam assassin setup on my mail server.   I installed spam assassin using 
perl's CPAN module, so I'm not sure how different it is from the ports install.

You need to have the spam assassin daemon (spamd) running.  I imagine the port installs a 
startup script in /usr/local/etc/rc.d .  If not, you can just add '/usr/bin/spamd &' to 
your /etc/rc.local

In my user's home directories I have a .forward file.   In that file is a line like (the 
quotes are part of the file):

"|IFS=' ' && exec /usr/local/bin/procmail -Yf- || exit 75 #USERNAME"

replace USERNAME with the correct username.

I also have a .procmailrc file in the user's home directory.  It looks something like:

PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:$HOME/bin
MAILDIR=/var/mail/USERNAME
#LOGFILE=$HOME/Mail/backup/logfile

#This will process the mail and flag it
:0fw
* < 256000
|/usr/bin/spamc

#Uncomment the section below to delete spam on the server.
#:0:
#* ^X-Spam-Flag: Yes
#/dev/null

#other procmail rules go here

Again, replace USERNAME with the correct username.

With that default setup, users will receive spam, but it will flagged in the headers and 
have a blurb at the beginning which they can use to create filters in their mail client. 
  I delete spam right on the server in my accounts.

You'll also have a procmailrc file in /usr/local/etc/ that you can put global (server 
wide) mail processing rules in.

Once spam assassin is functioning on a user's account there will be a .spamassassin folder 
in the home dir.  You can use the .spamassassin/user_prefs file to fine tune their spam 
assassin if need be.

Hope this helps.
-- 
Clint Gilders <techservices@onlinehobbyist.com>
Director of Technology Services
OnlineHobbyist.com, Inc.



Eric F Crist wrote:
> Ok folks,
> 
> I'm very, very overwhelmed here.  I think it comes from trying to setup too 
> many things at once.  I have sendmail running (from base install).  I need to 
> get SpamAssassin and Procmail working, with users having the ability to 
> opt-out of the spam filtering.  I mainly offer POP3 mail access (via qpopper) 
> and I'm thinking of adding in Squirrelmail support with IMAP.  I have a 
> working mail/pop server and everything is fine there.  The spam assassin port 
> and procmail ports have been through a make install clean and I haven't the 
> foggiest idea on how to get the two of them working together with sendmail.  
> Please help.
> 
> TIA
> 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?401514E7.2060608>