postfix邮件服务器 (适用于大型网络)
rpm -qa | grep postfix
rpm -ivh postfix-2.1.5-2.3.RHEL4.1.rpm
service sendmail stop
service postfix start
netstat -an | grep 25
创建DNS:
service named start
vi /var/named/chroot/etc/named.conf
zone "lxh123.com" IN {
type master;
file "lxh123.com";
};
cd /var/named/chroot/var/named
cp localhost.zone lxh123.com
vi lxh123.com
IN 10 MX lxh123.com.
mail.lxh123.com. IN A 202.106.20.134
vi /etc/postfix/main.cf
在myhostname下加:
myhostname = mail.lxh123.com 邮件A记录是什么?
在mydomain下加:
mydomain = lxh123.com 域名是什么?
放开
inet_interfaces = all 在所有IP上工作
注释inet_interface = localhost
放开: 我可以接收谁的邮件
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
在mynetwoks下加:
mynetworks = 202.106.20.0/24 局域网是什么?
/etc/rc.d/init.d/dovecot start 启用收邮件功能 开110端口
vi /etc/dovecot.conf
把#protocols = imap imaps 改成:
protocols = imap imaps pop3
/etc/rc.d/init.d/dovecot restart
netstat -an | grep 110
启用别名:
vi /etc/aliases
添加:如:
ftp110 abc
newaliases 刷新aliases
启用SMTP认证:
vi /etc/postfix/main.cf
在文件最后面加以下几句:
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients=yes
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_sasl_security_options = noanonymous