For erdelynet.com, I do not use a site-wide configuration, but in other SpamAssassin installations I maintain, I do. Here's how to set up SpamAssassin in a site-wide configuration 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".
- Install p5-Mail-SpamAssassin and its prerequisites. Alternatively, you can install SpamAssassin 3.0.2 from -current ports.
- Download and install my spamass-milter port.
- Follow the directions in the post-install message adding the appropriate commands to your /etc/rc.conf.local and /etc/rc.conf.
- The next part assumes that you have not modified your /etc/mail/sendmail.cf: copy the OpenBSD prototype mc file: sudo cp /usr/share/sendmail/cf/openbsd-proto.mc /etc/mail
- Download my patchfile to your home directory: sendmail-milter-spamass.patch
- Change to the mail directory: cd /etc/mail
- Apply my patch: patch -p0 < ~/sendmail-milter-spamass.patch
- Create new sendmail.cf: m4 /etc/mail/openbsd-proto.mc > ~/sendmail.cf
- Copy new sendmail.cf to /etc/mail: sudo cp ~/sendmail.cf /etc/mail ; rm ~/sendmail.cf
- Add the following line to your /etc/rc.conf.local file: sendmail_flags="-L sm-mta -bd -q30m"
- Either reboot or manually launch spamass-milter with the options you used in your /etc/rc.conf.local file and run: /usr/sbin/sendmail -L sm-mta -bd -q30m