cd /usr/ports/mail/qmail
make
make install
This will download the code from an ftp site, if you haven't already copied the
source files into /usr/ports/distfiles.
Here we are going to setup some qmail options, so it will boot at startup time and use
the ./Maildir mail delivery structure
cp /var/qmail/boot/home /var/qmail/rc
Now we are editing the boot file to change to ./Maildir format
vi /var/qmail/rc
Now you will see:
#!/bin/sh
# 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 ./Mailbox splogger qmail&
We want this, notice the highlighted ./Maildir:
#!/bin/sh
# 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 ./Maildir splogger qmail&
We want to link the sendmail file (from the qmail installation) to
the locations of the old sendmail binary so.
ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
Then we edit the inetd.conf file so we can run qmail and pop3
vi /etc/inetd.conf
Uncomment this line the following line. This will make let qmail run
from inetd. [note this line has been wrapped in this article to make it fit the
page]
smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env
tcp-env /var/qmail/bin/qmail-smtpd
This line will let pop3 run from inetd
pop3 stream tcp nowait root /usr/local/libexec/popper popper
Now qmail automatically puts a bootup file in /usr/local/etc/rc.d/.
The file name is qmail.sh and it will make sure qmail starts when the
box gets rebooted. |