1. postfix 服务器配置
安装postfix
rpm ivh postfix-2.6.6-2.2.el6_1.x86_64.rpm
配置postfix
vim /etc/postfix/main.cf
inet_interfaces = all
home_mailbox = Maildir/
# 如果其它网段的主机也想通过这台机发送邮件,加到 mynetworks里
mynetworks = 192.168.235.0/24,192.168.2.0/24, 127.0.0.0/8
查看使用sendmail还是postfix
alternatives --config mta
alternatives --set mta /usr/sbin/sendmail.postfix
2. 客户端(一般是不能访问外网)使用 postfix转发功能
其它服务器如果想用此postfix服务器发送邮件,配置postfix的转发即可:
配置转发:
vim /ec/postfix/main.cf
inet_interfaces=localhost
relayhost = 192.168.1.10
3. 测试(可在服务器或客户端测试)
mailx -r root@bst.it -s "test project" linengjiang@bst.com < install.log
服务器上查看发送邮件的log
tail -f /var/log/maillog
安装postfix
rpm ivh postfix-2.6.6-2.2.el6_1.x86_64.rpm
配置postfix
vim /etc/postfix/main.cf
inet_interfaces = all
home_mailbox = Maildir/
# 如果其它网段的主机也想通过这台机发送邮件,加到 mynetworks里
mynetworks = 192.168.235.0/24,192.168.2.0/24, 127.0.0.0/8
查看使用sendmail还是postfix
alternatives --config mta
alternatives --set mta /usr/sbin/sendmail.postfix
2. 客户端(一般是不能访问外网)使用 postfix转发功能
其它服务器如果想用此postfix服务器发送邮件,配置postfix的转发即可:
配置转发:
vim /ec/postfix/main.cf
inet_interfaces=localhost
relayhost = 192.168.1.10
3. 测试(可在服务器或客户端测试)
mailx -r root@bst.it -s "test project" linengjiang@bst.com < install.log
服务器上查看发送邮件的log
tail -f /var/log/maillog
备注:如果想深入了解,可以看看
http://www.postfix.org
http://www.postfix.org/BASIC_CONFIGURATION_README.html
http://linux.vbird.org/linux_server/0380mail.php
http://www.postfix.org
http://www.postfix.org/BASIC_CONFIGURATION_README.html
http://linux.vbird.org/linux_server/0380mail.php
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10995764/viewspace-2129773/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10995764/viewspace-2129773/