MT6 webmail

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

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

Start up the jail:

service jail start webmail

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

jail_manage webmail

Install php5:

pkg install php5 lighttpd squirrelmail roundcube mkdir /var/spool/lighttpd/sockets chown -R www /var/spool/lighttpd/sockets cd /usr/local/etc/lighttpd

If you don't have an IPv6 address found to this jail, disable IPv6:

sed -i .bak -e 's/server.use-ipv6 = "enable"/server.use-ipv6 = "disable"/' lighttpd.conf

Also remove the second IPv4 port 80 binding in the default config:

sed -i .bak -e 's/^\$SERVER\["socket"\]/#\$SERVER\["socket"\]/' lighttpd.conf

Start up lighttpd:

echo 'lighttpd_enable=YES' >> /etc/rc.conf service lighttpd start