Qmail on Nexenta

From Wiki
Jump to: navigation, search

Installing qmail on Nexenta:

First prepare the system for the install.

Create a file system:

zfs create -o mountpoint=/var/qmail syspool/qmail

Add system users and groups:

groupadd nofiles
groupadd qmail
useradd -g nofiles -d /var/qmail/alias -s /bin/false alias
useradd -g nofiles -d /var/qmail -s /bin/false qmaild
useradd -g nofiles -d /var/qmail -s /bin/false qmaill
useradd -g nofiles -d /var/qmail -s /bin/false qmailp
useradd -g nofiles -d /var/qmail -s /bin/false qmailq
useradd -g nofiles -d /var/qmail -s /bin/false qmailr
useradd -g nofiles -d /var/qmail -s /bin/false qmails

Download the source:

wget http://qmail.mirrors.auchnet.org/netqmail-1.06.tar.gz
tar xzvf netqmail-1.06.tar.gz
cd netqmail-1.06


make setup check
./config-fast the.full.hostname

Startup script - /var/qmail/rc:


# Using splogger to send the log through syslog.
# Using qmail-local to deliver messages to ~/Mailbox by default.

exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start "`cat /var/qmail/control/defaultdelivery`" splogger qmail
echo ./Mailbox >/var/qmail/control/defaultdelivery
chmod +x /var/qmail/rc

Enable SMTP service:

Add this line to /etc/inetd.conf

smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env tcp-env /var/qmail/bin/qmail-smtpd

Convert the service to run with SMF

inetadm -e network/smtp/tcp:default

At this point you should be done, qmail will deliver messages to users' maildir by default. You can also install vpopmail for virtual domain support.


zfs create -o mountpoint=/export/home/vpopmail syspool/home/vpopmail
groupadd vchkpw
useradd -g vchkpw -d /export/home/vpopmail vpopmail
./configure --disable-clear-passwd && make && make install-strip