Postfix SMTP发送错误-这里出了什么问题?


0

我目前正在使用Debian Wheezy设置新的虚拟专用服务器。我设法安装了postfix,鸽舍(IMAP)和MySQL。

到目前为止,我可以使用外部邮件客户端(如Thunderbird或Android Mail客户端)通过SSL成功登录并接收邮件。但是,发送仍无法正常进行,因为尝试发送时出现此错误:

Nov 13 13:35:30 vmd3299 dovecot: auth-worker(7819): mysql(127.0.0.1): Connected to database mailserver
Nov 13 13:35:30 vmd3299 dovecot: imap-login: Login: user=<kontakt@mydomain.de>, method=PLAIN, rip=109.44.0.191, lip=91.205.173.36, mpid=7821, TLS, session=<1/JfMw7rqABtLADF>
Nov 13 13:35:42 vmd3299 postfix/smtpd[7822]: connect from ip-109-44-0-191.web.vodafone.de[109.44.0.191]
Nov 13 13:35:43 vmd3299 postfix/smtpd[7822]: NOQUEUE: reject: RCPT from ip-109-44-0-191.web.vodafone.de[109.44.0.191]: 554 5.7.1 <kontakt@mydomain.de>: Recipient address rejected: Access denied; from=<kontakt@mydomain.de> to=<kontakt@mydomain.de> proto=ESMTP helo=<[10.149.184.22]>
Nov 13 13:35:43 vmd3299 postfix/smtpd[7822]: disconnect from ip-109-44-0-191.web.vodafone.de[109.44.0.191]

据我所知,TLS登录似乎有效,仅此而已。我无法将邮件发送给任何收件人,既不能发送给外部收件人,也不能发送给同一域中的本地邮件帐户。

我的确切版本是:

  • 后缀2.9.6
  • Debian Wheezy(3.2.0-4-amd64#1 SMP Debian 3.2.51-1 x86_64 GNU / Linux)

这是我的postfix main.cf:

#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_recipient_restrictions = permit_sasl_authenticated, reject

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = vmd3299.myhoster.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = vmd3299.myhoster.net, localhost.myhoster.net, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

经过数小时的谷歌搜索,我到达了一个我现在不知道该怎么做的地步。有人可以帮我这个忙,也许可以指导我完成最后的步骤?我以某种方式感到这里要做的只是一点点。提前致谢!

更新:

更改此行后:

smtpd_recipient_restrictions = permit_sasl_authenticated, reject

对此:

smtpd_recipient_restrictions =
   permit_mynetworks
   permit_sasl_authenticated
   reject_unauth_destination

我能够向自己发送测试邮件,recpipient是发送邮件的同一用户。其他现有的外部收件人仍然被拒绝:

Nov 13 14:19:45 vmd3299 postfix/smtpd[8240]: NOQUEUE: reject: RCPT from ip-109-44-0-191.web.vodafone.de[109.44.0.191]: 554 5.7.1 <ed.external@outside.com>: Relay access denied; from=<kontakt@mydomain.de> to=<eddie.external@outside.com> proto=ESMTP helo=<[10.149.184.191]>

更新:

我通过将这两行添加到 /etc/postfic/main.cf

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

现在,一切都可以通过TLS和身份验证正常运行。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.