下载地址 (HTTP): http://www.qmail.org/qmail-1.03.tar.gz 下载地址 (FTP): 版本: 1.03 软件包大小: 225 KB 估计所需硬盘空间: 4.6 MB |
额外下载: qmail errno 补丁 |
qmail包中包含Dan Bernstein的邮件传送代理(MTA)。qmail提供本地和远程邮件传送/转发。
在安装qmail前需要用下面的命令为它添加用户和用户组:
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 |
用下面的命令安装qmail:
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 |
如果使用了inetd,用下面的命令将qmaild条目添加到/etc/inetd.conf中:
echo "smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env \ tcp-env /var/qmail/bin/qmail-smtpd" >> /etc/inetd.conf |
如果使用了xinetd,用下面的命令将qmaild条目添加到/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 |
如果要自动运行qmail,可以用下面的命令创建init.d脚本:
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 - [email protected] 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 |
用下面的命令在相应的rc.d目录中创建符号链接:
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 |
qmail包中包含 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以及 qmail-start。