Showing posts with label Postfix. Show all posts
Showing posts with label Postfix. Show all posts

Tuesday, May 29, 2007

postfix最简安装与卸载

groupadd postfix
groupadd postdrop
useradd -g postfix postfix

mv /usr/sbin/sendmail /usr/sbin/sendmail.OFF
mv /usr/bin/newaliases /usr/bin/newaliases.OFF
mv /usr/bin/mailq /usr/bin/mailq.OFF
chmod 755 /usr/sbin/sendmail.OFF /usr/bin/newaliases.OFF /usr/bin/mailq.OFF

make -f Makefile.init makefiles \
'CCARGS=-DUSE_SASL_AUTH -I/usr/include/sasl' \
'AUXLIBS=-L/usr/lib/sasl2 -lsasl2 -lz -lm'

make install

postfix start

卸载Postfix,请按如下方法卸载:



postfix stop

rm -f /usr/sbin/sendmail

rm -f /usr/bin/newaliases

rm -f /usr/bin/mailq

rm -rf /usr/libexec/postfix

rm -rf /etc/postfix

rm -f /usr/sbin/post*



mv /usr/sbin/sendmail.OFF /usr/sbin/sendmail

mv /usr/bin/newaliases.OFF /usr/bin/newaliases

mv /usr/bin/mailq.OFF /usr/bin/mailq

Tuesday, May 22, 2007

postfix启动失败

[root@localhost postfix]# postfix start
postfix/postfix-script: starting the Postfix mail system
但是用ps命令查看却发现postfix没有启动,查看/var/log/maillog
May 22 10:27:58 localhost postfix/master[13426]: fatal: bind 0.0.0.0 port 25: Address already in use
原来旧的sendmail已经运行并占用了25这个端口,因为当时系统安装我没选择邮件服务器,所以忘了去停掉原来的sendmail服务。