MT6 qmail

Create a jail for qmail
Make a zfs filesystem for qmail, based off the 'base' snapshot we created:

zfs clone zroot/jails/base@10.0 zroot/jails/qmail

Start up the jail:

service jail start qmail

The jail_manage script mounts the /usr/ports from the host system and enters the jail:

jail_manage qmail

Install our mail spool:

pkg install qmail perl5.18 daemontools /var/qmail/scripts/enable-qmail echo 'mail.example.com' > /var/qmail/control/me cp /var/qmail/boot/maildir /var/qmail/rc cd /usr/ports/mail/vpopmail && make install clean

Enable options maildrop and ...

cd /usr/ports/mail/dovecot2 && make install clean

Enable options vpopmail and libwrap. cp -r /usr/local/share/doc/dovecot/example-config/* /usr/local/etc/dovecot/ sed -i -e 's/^#listen = \*, ::/listen = \*/' /usr/local/etc/dovecot/dovecot.conf mkdir /etc/ssl/certs /etc/ssl/private openssl req -x509 -nodes -days 2190 -newkey rsa:1024 -keyout /etc/ssl/private/dovecot.pem -out /etc/ssl/certs/dovecot.pem echo 'dovecot_enable=YES' >> /etc/rc.conf service dovecot start

start up qmail
echo 'svscan_enable="YES"' >> /etc/rc.conf mkdir -p /var/service /var/qmail/supervise/smtpd service svscan start

echo < /var/qmail/supervise/smtpd/run
 * 1) !/bin/sh