$OpenBSD: README,v 1.9 2018/09/04 12:46:15 espie Exp $

+-----------------------------------------------------------------------
| Running mimedefang on OpenBSD
+-----------------------------------------------------------------------

Post-installation steps
=======================
Register the mimedefang milter with sendmail(8) by adding the following
to your .mc file:

    INPUT_MAIL_FILTER(`mimedefang', \
        `S=local:/var/spool/MIMEDefang/mimedefang.sock, \
        F=T, T=C:15m;S:4m;R:4m;E:10m')dnl

Then re-generate your .cf file.

When using administrator notifications, it is advised to add the
"_mdefang" user to the list of users that are allowed to set their
envelope "from" address to a different user. This is done in:
    /etc/mail/trusted-user

Improving performance
---------------------
On a busy mail server, it is advised to have the spool directory in
virtual memory (i.e. ramdisk). This can be achieve by adding the
following line to fstab(5):
swap /var/spool/MIMEDefang tmpfs rw,nodev,nosuid,-s256M,-u570,-g570,-m0750 0 0

This will create a 256M tmpfs filesystem under /var/spool/MIMEDefang.

SpamAssassin
------------
SpamAssassin can be used my mimedefang(8) in which case some maintenance
tasks are required and cron(8) jobs must be setup in root's crontab(5):

- Automating SpamAssassin rule updates:
0	0	*	*	*	PATH=${PATH}:/usr/local/bin; /usr/local/bin/sa-update && /etc/rc.d/mimedefang_multiplexor reload >/dev/null

- Synchronizing the journal data into the Bayes databases:
30	0	*	*	*	PATH=${PATH}:/usr/local/bin; su -s /bin/sh _mdefang -c "/usr/local/bin/sa-learn --force-expire >/dev/null"

IP validation header
====================
To retain relay's IP address information between Mail eXchangers, an
identical /etc/mail/mimedefang-ip-key must be installed on all
relays. The content of this file is generated using:
    # /usr/local/share/examples/gen-ip-validator.pl

Start-up order
==============
Be sure to start mimedefang_multiplexor before mimedefang in rc.local(8).
    # rcctl order mimedefang_multiplexor mimedefang
