Using fatbsd's last port (clamav-0.80_3.6.tgz) and the port in OpenBSD's -current ports tree, I was able to backport ClamAV 0.83 for 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/security/clamav
- Change to the clamav directory: cd ports/security/clamav
- Download my patchfile to your home directory: clamav-0.83_openbsd_3.6.patch
- Apply my patch: patch -p0 < ~/clamav-0.83_openbsd_3.6.patch
- Build the port in the usual way: make install
- Follow the directions in the post-install comments to add the necessary components to /etc/rc.conf.local and /etc/rc.local.
- 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-clamav.patch
- Change to the mail directory: cd /etc/mail
- Apply my patch: patch -p0 < ~/sendmail-milter-clamav.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 clamav-milter and freshclam with the options you used in your /etc/rc.conf.local file and run: /usr/sbin/sendmail -L sm-mta -bd -q30m
Note: If you are also using SpamAssassin + SpamAss Milter, you should substitute my sendmail-milter-clamav-spamass.patch instead of my sendmail-milter-clamav.patch.