下载地址 (HTTP): 下载地址 (FTP): ftp://ftp.exim.org/pub/exim/exim4/exim-4.14.tar.bz2 版本: 4.14 软件包大小: 1.2 MB 估计所需硬盘空间: 8.7 MB |
exim包中包含一个剑桥大学编写的邮件传送代理,该程序是在GNU公开许可证下发布的。
exim依赖于: db-4.1.25 |
在编译exim之前,我们需要用下面的命令为exim建立用户和用户组:
groupadd exim useradd -d /dev/null -g exim -s /bin/false exim |
用下面的命令安装exim:
sed -e 's/^BIN_DIR.*$/BIN_DIRECTORY=\/usr\/sbin/' src/EDITME | \ sed -e 's/^CONF.*$/CONFIGURE_FILE=\/etc\/exim.conf/' | \ sed -e 's/^EXIM_USER.*$/EXIM_USER=exim/' | \ sed -e 's/^EXIM_MONITOR/#EXIM_MONITOR/' > Local/Makefile && make && make install && ln -s /usr/sbin/exim /usr/sbin/sendmail |
用下面的命令创建exim的配置文件:
cat >> /etc/aliases << "EOF" postmaster: root MAILER-DAEMON: root EOF exim -v -bi /usr/sbin/exim -bd -q1m |
注: 为了保护已经存在的/etc/aliases文件, 我们将这些别名追加到该文件尾部。我们需要检查这个文件,删去重复的别名。
为了在系统启动/关闭时启动和停止exim,可以用下面的命令创建exim启动脚本:
cat > /etc/rc.d/init.d/exim << "EOF" #!/bin/sh # Begin $rc_base/init.d/exim # 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 exim..." loadproc /usr/sbin/exim -bd -q1m ;; stop) echo "Stopping exim..." killproc exim ;; status) statusproc exim ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|status|restart}" exit 1 ;; esac # End $rc_base/init.d/exim EOF chmod 755 /etc/rc.d/init.d/exim |
用下面的命令创建不同运行级下的符号链接:
cd /etc/rc.d/init.d && ln -sf ../init.d/exim ../rc0.d/K25exim && ln -sf ../init.d/exim ../rc1.d/K25exim && ln -sf ../init.d/exim ../rc2.d/K25exim && ln -sf ../init.d/exim ../rc3.d/S35exim && ln -sf ../init.d/exim ../rc4.d/S35exim && ln -sf ../init.d/exim ../rc5.d/S35exim && ln -sf ../init.d/exim ../rc6.d/K25exim |
groupadd exim useradd -g exim exim : |
sed -e 's/^BIN_DIR.*$/BIN_DIRECTORY=\/usr\/sbin/' src/EDITME | \ sed -e 's/^CONF.*$/CONFIGURE_FILE=\/etc\/exim.conf/' | \ sed -e 's/^EXIM_USER.*$/EXIM_USER=exim/' | \ sed -e 's/^EXIM_MONITOR/#EXIM_MONITOR/' > Local/Makefile : |
ln -s /usr/sbin/exim /usr/sbin/sendmail : 为一些需要使用sendmail的应用程序创建链接。exim不接受大多数的Sendmail命令行选项。
exim包中包括 exim, exim_dumpdb, exim_fixdb, exim_tidydb, exinext, exiwhat, exim_dbmbuild, exicyclog, exigrep, eximstats, exiqsumm, exim_lock以及 exim_checkaccess.