The qmail package contains Dan Bernstein's Mail Transport Agent (MTA). qmail provides local and remote mail delivery/relaying.
Download (HTTP): http://www.qmail.org/qmail-1.03.tar.gz
Download (FTP): ftp://ftp.comimpex.cz/LINUX/System/qmail-1.03.tar.gz
Download size: 225 KB
Estimated Disk space required: 4.6 MB
Estimated build time:
qmail needs certain user and group account to be added before installation of the software. Add the users and groups with the following commands:
mkdir /var/qmail && groupadd nofiles && useradd -g nofiles -d /var/qmail/alias alias && useradd -g nofiles -d /var/qmail qmaild && useradd -g nofiles -d /var/qmail qmaill && useradd -g nofiles -d /var/qmail qmailp && groupadd qmail && useradd -g qmail -d /var/qmail qmailq && useradd -g qmail -d /var/qmail qmailr && useradd -g qmail -d /var/qmail qmails |
Install qmail by running the following commands:
patch -Np1 -i ../qmail-1.03.errno.patch && make setup check && ./config-fast `hostname` && cd /var/qmail && touch .qmail-postmaster .qmail-mailer-daemon .qmail-root && chmod 644 .qmail-* && ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail && mv /var/qmail/boot/home /var/qmail/rc && for mandir in 1 5 7 8; do mv /var/qmail/man/man$mandir/* \ /usr/man/man$mandir; done && rm -rf /var/qmail/man |
If inetd is used, the following command will add the qmaild entry to /etc/inetd.conf:
echo "smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env \ tcp-env /var/qmail/bin/qmail-smtpd" >> /etc/inetd.conf |
If xinetd is used, the following command will add the qmaild entry to /etc/xinetd.conf:
cat >> /etc/xinetd.conf << "EOF" service smtp { disable = no identifier = smtp-local socket_type = stream protocol = tcp wait = no user = qmaild server = /var/qmail/bin/tcp-env server_args = /var/qmail/bin/qmail-smtpd env = RELAYCLIENT= only_from = 127.0.0.1 log_on_failture += USERID } EOF |
To automate the running of qmail, use following command to create the init.d script:
cat > /etc/rc.d/init.d/qmail << "EOF" #!/bin/sh # Begin $rc_base/init.d/qmail # Based on sysklogd script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org source /etc/sysconfig/rc source $rc_functions case "$1" in start) echo "Starting Qmail..." /var/qmail/rc & ;; stop) echo "Stopping Qmail..." killall qmail-send ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac # End $rc_base/init.d/qmail EOF chmod 755 /etc/rc.d/init.d/qmail |
Create the symbolic links to this file in the relevant rc.d directory with the following commands:
cd /etc/rc.d/init.d && ln -sf ../init.d/qmail ../rc0.d/K25qmail && ln -sf ../init.d/qmail ../rc1.d/K25qmail && ln -sf ../init.d/qmail ../rc2.d/K25qmail && ln -sf ../init.d/qmail ../rc3.d/S35qmail && ln -sf ../init.d/qmail ../rc4.d/S35qmail && ln -sf ../init.d/qmail ../rc5.d/S35qmail && ln -sf ../init.d/qmail ../rc6.d/K25qmail |
The qmail package contains bouncesaying, condredirect, except, forward, maildir2mbox, maildirmake, maildirwatch, mailsubj, preline, qbiff, qreceipt, qmail-clean, qmail-inject, qmail-local, qmail-pop3d, qmail-popup, qmail-qstat, qmail-send, qmail-smtpd and qmail-start.