文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>linux下的postfix

linux下的postfix

时间:2009-03-23  来源:sjhf

首先把sendmail关闭掉 mail.cf是postfix的主配置文件

vi /etc/postfix/main.cf

queue_directory = /var/spool/postfix 邮件对冽的目录

command_directory = /usr/sbin 管理postfix命令存放位置

daemon_directory = /usr/libexec/postfix 进程存放位置

mail_owner = postfix postfix的所有者是谁

#myhostname = host.domain.tld 打开的服务器是什么 比如 mail.yirehe.com

#mydomain = domain.tld 打开域名是什么,比如 yirehe.com

inet_interfaces = localhost 定义postfix工作的网卡是本地


#inet_interfaces = all 定义postfix工作在所有的网卡上


#inet_interfaces = $myhostname 侦听在域名的公网IP上。可以定义一下

mydestination = $myhostname, localhost.$mydomain 目的的网络


#mynetworks = 168.100.189.0/28, 127.0.0.0/8 定义局域网的网段

#relayhost = gateway.my.domain 后面添加IP也行。添加域名也行。中继那些ip
 或域名


alias_maps = hash:/etc/postfix/aliases postfix的别名文件


#alias_maps = hash:/etc/aliases, nis:mail.aliases 让postfix用原来的别名文件

#smtpd_banner = $myhostname ESMTP $mail_name telnet时出现的欢迎

做SMTP认证首先检察装没装sasl

rpm -qa | grep sasl
cyrus-sasl-devel-2.1.10-4
cyrus-sasl-md5-2.1.10-4
cyrus-sasl-gssapi-2.1.10-4
cyrus-sasl-2.1.10-4
cyrus-sasl-plain-2.1.10-4


加上smtpd_sasl_auth_enable = yes (启动smtp认证)
    smtpd_sasl_security_options = noanonymous(安全操作没有匿名用户)
    broken_sasl_auth_clients=yes(检察客户端是否认证)
    smtpd_recipient_restrictions = permit_sasl_authenticated permit_auth_destination reject
    (如果认证成功就允许)


------------------
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

alias_maps=hash:/etc/aliases 别名使用的别名文件。


 

本文出自 “E网咖啡猫” 博客,转载请与作者联系!

linux下的postfix rpm包

rpm -qa | grep postfix
postfix-2.2.1-1.vhg
它转发邮箱的速度快。端口为25

相关阅读 更多 +
排行榜 更多 +
准时宝

准时宝

游戏工具 下载
伐木大亨

伐木大亨

模拟经营 下载
加入伐木工

加入伐木工

休闲益智 下载