In the /root/sources directory with qmail sources
and the qmail-smtpd.patch file (download qmail-smtpd.patch here),
execute the following commands, or create and run the script with these commands,
under root:
# cd /root/sources/
# tar xzf ${QMAIL_NAME}.tar.gz -C ${BUILD_DIR}
# cd ${BUILD_DIR}/${QMAIL_NAME}
# patch -p0 < /root/sources/qmail-smtpd.patch || exit 1
# echo Making
# make setup check || exit 1
# echo Config-fast
# ./config-fast ${MAILDOMAIN_COM} || exit 1
# [ -d /hsphere/local/var ] || mkdir -p /hsphere/local/var
# rm -f /hsphere/local/var/qmail
# mkdir -p /hsphere/local/var
# ln -s /var/qmail /hsphere/local/var/qmail
# cp -f /hsphere/local/var/qmail/boot/home /hsphere/local/var/qmail/rc
Here,
- QMAIL_NAME is the qmail package name;
- BUILD_DIR is the qmail build directory;
- MAILDOMAIN_COM is the mail server domain name.