|
|
Postfix是mail server, sendmail
的替代品,Cyrus是接收mail的service(POP3或者IMAP). 1. Download postfix-2.2.9.tar.gz 2. tar -xvvzf postfix-2.2.9.tar.gz 3. #make (编译) 4. 创建postfix帐号和组: /etc/passwd: postfix:*:12345:12345:postfix:/no/where:/no/shell
/etc/group:
postfix:*:12345:
/etc/group:
postdrop:*:54321:
5. 开始安装:
#make install (interactive version, first time install)
6. 配置Postfix:
postfix有两个主要的conf文件: /etc/postfix/main.cf /etc/postfix/master.cf
缺省的参数基本不用修改,在mail.cf中主要修改myhostname和mydomain,
设置inet_interfaces=all(不要localhost,不然不能从其他机器发送 mail)
7. 运行Postfix:
# /etc/sbin/postfix start # /etc/sbin/postfix stop # /etc/sbin/postfix reload (更改了hostname,hostdomain及 inet_interfaces后,最好运行stop and start)
# /etc/sbin/postfix check 检查postfix有没有问题
# /etc/sbin/postconf 用来查看和修改postfix的参数,也可以通过 main.cf和master.cf来修改.
# /etc/sbin/postqueue 用来查看queue中的mail
# /etc/sbin/postsuper 用来管理queue中的mail(删除,状态改变等)
可以检查/var/log/maillog,来看postfix的运行情况.
安装Cyrus的步骤,遇到的问题及解决办法.
(Cyrus的安装复杂点,花费了不少时间)
1. Download cyrus-imapd-2.3.3.tar.gz
2. tar -zxvf tar/cyrus-imapd-2.3.3.tar.gz 3. cp /usr/include/com.err.h /usr/include/ 4. ./configure --with-auth=unix 5. 添加一个user useradd -g mail cyrus passwd cyrus
6. make depend
make all CFLAGS=-O make install
7. 配置Cyrus:
修改/etc/syslog.conf,加入: local6.debug /var/adm/imapd.log auth.debug /var/adm/auth.log
创建/etc/imapd.conf,加入:
configdirectory: /var/imap
partition-default: /var/spool/imap admins: cyrus root srvtab: /var/imap/srvtab allowanonymouslogin: no sasl_passwd_check: saslauthd(我没有用shadow和pam) sasl_pwcheck_method: auxprop
8. 创建一些必要的目录:
mkdir /var/adm touch /var/adm/imapd.log /var/adm/auth.log mkdir /var/imap /var/spool/imap /var/imap/srvtab chown cyrus /var/imap /var/spool/imap /var/imap/srvtab chgrp mail /var/imap /var/spool/imap /var/imap/srvtab chmod 750 /var/imap /var/spool/imap /var/imap/srvtab
一定要执行如下命令:
su cyrus
tools/mkimap exit
9. 查看/etc/services文件,如果没有以下行则加入:
pop3 110/tcp imap 143/tcp
查看/etc/postfix/master.cf文件,uncomment以下行:
cyrus unix - n n - - pipe
user=cyrus argv=/usr/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
10. cp master/conf/normal.conf /etc/cyrus.conf
11. 启动Cyrus
/usr/cyrus/bin/master &
12. 查看Log文件:/var/adm/imapd.log
查看 /etc/postfix/main.cf,确保以下行的存在:
mailbox_transport = lmtp:unix:/var/imap/socket/lmtp |
关于安装Postfix(2.2.9) and Cyrus(2.3.3) on Linux(FC4)
最新推荐文章于 2024-09-08 16:25:03 发布