当前位置: 技术问答>linux和unix
[求助]postfix smtp本地验证无法通过!
来源: 互联网 发布时间:2016-04-05
本文导语: 环境: CentOS5.1 Postfix + Cyrus-SASL + dovecot 验证SMTP失败. telnet 本机25端口的时候停住没有反映了 配置如下: /etc/postfix/main.cf myhostname = mail.pie.com.cn mydomain = pie.com.cn myorigin = $mydomain relay_domains = $mydestination...
环境: CentOS5.1 Postfix + Cyrus-SASL + dovecot
验证SMTP失败.
telnet 本机25端口的时候停住没有反映了
配置如下:
/etc/postfix/main.cf
myhostname = mail.pie.com.cn
mydomain = pie.com.cn
myorigin = $mydomain
relay_domains = $mydestination
mydestination = $myhostname,localhost.$mydomain,$mydomain
inet_interfaces =all
mynetworks = 192.168.0.0/22,127.0.0.0/8
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_auth_destination
broken_sasl_auth_clients = yes
home_mailbox = Maildir/
/usr/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: plain login
日志:
Jul 6 22:53:27 localhost postfix/postfix-script: starting the Postfix mail system
Jul 6 22:53:27 localhost postfix/master[9544]: daemon started -- version 2.3.3, configuration /etc/postfix
Jul 6 22:53:33 localhost postfix/smtpd[9552]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
Jul 6 22:53:34 localhost postfix/master[9544]: warning: process /usr/libexec/postfix/smtpd pid 9552 exit status 1
Jul 6 22:53:34 localhost postfix/master[9544]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
验证SMTP失败.
telnet 本机25端口的时候停住没有反映了
配置如下:
/etc/postfix/main.cf
myhostname = mail.pie.com.cn
mydomain = pie.com.cn
myorigin = $mydomain
relay_domains = $mydestination
mydestination = $myhostname,localhost.$mydomain,$mydomain
inet_interfaces =all
mynetworks = 192.168.0.0/22,127.0.0.0/8
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_auth_destination
broken_sasl_auth_clients = yes
home_mailbox = Maildir/
/usr/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: plain login
日志:
Jul 6 22:53:27 localhost postfix/postfix-script: starting the Postfix mail system
Jul 6 22:53:27 localhost postfix/master[9544]: daemon started -- version 2.3.3, configuration /etc/postfix
Jul 6 22:53:33 localhost postfix/smtpd[9552]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
Jul 6 22:53:34 localhost postfix/master[9544]: warning: process /usr/libexec/postfix/smtpd pid 9552 exit status 1
Jul 6 22:53:34 localhost postfix/master[9544]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
|
错误日志已经告诉你答案了。
配置项:smtpd_recipient_restrictions至少需要指定下列几个参数之一。
check_relay_domains, reject_unauth_destination, reject, defer , defer_if_permit
配置项:smtpd_recipient_restrictions至少需要指定下列几个参数之一。
check_relay_domains, reject_unauth_destination, reject, defer , defer_if_permit
|
|
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_auth_destination
这语句有问题,可以参考
smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination
这语句有问题,可以参考
smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination