
The version of SpamAssassin that is included with OpenBSD-current (OpenBSD 3.7-beta) compiles and installs cleanly on OpenBSD 3.6.
Notes: I'm logged in as a non-priviledged user who is a member of wheel. Wheel is allowed to run any command with sudo. Also, my user is a member of the wsrc group. Finally, my /etc/mk.conf contains "SUDO=/usr/bin/sudo".
- Set CVSROOT to your favorite CVS mirror.
- If necessary, create a build directory: sudo mkdir -p /usr/local/ports ; sudo chgrp wsrc /usr/local/ports ; chmod 775 /usr/local/ports
- Change to a directory above your build directory: cd /usr/local
- Get the code: cvs -d $CVSROOT get ports/mail/p5-Mail-SpamAssassin
- Change to the clamav directory: cd ports/mail/p5-Mail-SpamAssassin
- Build the port in the usual way: make install
If you're going to use SpamAssassin's spamd:
- Create spamd group: sudo groupadd -g 506 _spamdaemon
- Create spamd user: sudo useradd -g _spamdaemon -d /nonexistent -L daemon -c 'SpamAssassin Daemon' -s /sbin/nologin -u 506 _spamdaemon
- Create spamassassin working directory: sudo mkdir -p -m 700 /var/spool/spamassassin
- Change ownership of working directory: sudo chown _spamdaemon:_spamdaemon /var/spool/spamassassin
- Edit your /etc/rc.conf.local file with: spamassassin_daemon="-c -m 10 -H"
- Edit your /etc/rc.local file with:
if [ -x /usr/local/bin/spamd -a X"${spamassassin_daemon}" != X"NO" ]; then
echo -n ' SpamAssassin'
/usr/local/bin/spamd -d -r /var/spool/spamassassin/spamd.pid \
-u _spamdaemon ${spamassassin_daemon}
fi - Finally, either reboot or start spamd with the options from rc.conf.local and rc.local.
Edit (January 17, 2006 @ 10:47 AM): Fixed variable mistake above. Changed {$spamassassin_daemon} to ${spamassassin_daemon}. Thanks, Dave.