中继访问被拒绝的Postfix问题 – 我已阅读所有类似的案例,并尝试几乎所有的东西

这是我第一次从零开始build立一个服务器,我认为自己是一个新东西的快速和良好的学习者,所以我尽我所能在CENTOS 6中用dovecot设置postfix,所以我得到了我的maillog拒绝的中继访问:

警告:187.167.4.199:主机名187-167-4-199.static.axtel.netvalidation失败:名称或服务未知Jan 20 23:21:35 blkarl1 postfix / smtpd [18634]:连接来自未知[187.167.4.199 ] 1月20日23:22:04 blkarl1 postfix / smtpd [18634]:NOQUEUE:拒绝:来自未知的RCPT [187.167.4.199]:554 5.7.1:中继访问被拒绝; from = to = proto = SMTP Jan 20 23:22:08 blkarl1 postfix / smtpd [18634]:disconnect from unknown [187.167.4.199]

postconf -n

alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = domain.com myhostname = mail.domain.com mynetworks = 10.178.0.0/19, 127.0.0.0/8 # I HAVE NO IDEA ABOUT THIS myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES relay_domains = sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550 

dovecot -n

 # 2.0.9: /etc/dovecot/dovecot.conf disable_plaintext_auth = no mail_location = maildir:~/Maildir mbox_write_locks = fcntl passdb { driver = pam } protocols = imap pop3 ssl = no ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_key = </etc/pki/dovecot/private/dovecot.pem userdb { driver = passwd } 

我可以阅读我的电子邮件,但我不能发送电子邮件给任何人以外,任何人都可以快速查看?

默认值没有改变。
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination

你不是从$mynetworks发送。
您没有发送到mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

也许你想要:

 smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_tls_cert_file = /etc/ssl/postfix/cert.crt smtpd_tls_key_file = /etc/ssl/postfix/key.key smtpd_tls_CAfile = /etc/ssl/postfix/chain.crt smtpd_tls_loglevel = 1 smtpd_tls_security_level = may smtpd_tls_auth_only = yes 

修改证书值是适当的。

设置sasl在这里描述太可变,但是http://www.postfix.org/SASL_README.html#server_dovecot应该是一个好的开始&#x3002;