我已经使用 ubuntu、postfix、dovecot 和 mysql 设置了邮件服务器。
尝试从 Web 界面发送邮件,邮件发送没有任何不便。尝试使用笔记本电脑上的电子邮件客户端(使用互联网)却无法发送。我收到此错误:
2 月 13 日 11:44:48 邮件 postfix/submission/smtpd[13066]: 警告:未知的 smtpd 限制:“permit_sasl_autenticated”
下一行是:
2 月 13 日 11:44:48 邮件 postfix/submission/smtpd[13066]: NOQUEUE: 拒绝:来自未知 [37.176.162.9] 的 RCPT:451 4.3.5 服务器配置错误;来自= 至= proto=ESMTP helo=<[192.168.0.100]>
第二行是我的消息被服务器拒绝。
我检查了 /etc/postfix/main.cf 并且我的 TLS 配置如下:
# 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_tls_cert_file=/etc/dovecot/cert.pem smtpd_tls_key_file=/etc/dovecot/private/cert.pem smtpd_use_tls=yes smtpd_tls_auth_only = yes
#Enabling SMTP for authenticated users, adn handing off autentication to Dovecot smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
正如您所见,任何地方都没有permit_sasl_autenticated
(并且整个文件中也没有)。
发生了什么事?你能帮我解决这个问题吗?
编辑-添加了我的日志的更完整的部分:
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: warning: hostname 217-221-73-77-static.albacom.net does not resolve to address 217.221.73.77: Name or service not known
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: connect from unknown[217.221.73.77]
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: disconnect from unknown[217.221.73.77]
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: warning: hostname 217-221-73-77-static.albacom.net does not resolve to address 217.221.73.77: Name or service not known
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: connect from unknown[217.221.73.77]
Feb 13 11:27:23 mail postfix/trivial-rewrite[12501]: warning: do not list domain montglane.it in BOTH mydestination and virtual_mailbox_domains
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: warning: unknown smtpd restriction: "permit_sasl_autenticated"
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: NOQUEUE: reject: RCPT from unknown[217.221.73.77]: 451 4.3.5 Server configuration error; from=<[email protected]> to=<[email protected]$
Feb 13 11:27:23 mail postfix/cleanup[12503]: D9AF313ED0D: message-id=<[email protected]>
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: disconnect from unknown[217.221.73.77]
Feb 13 11:27:23 mail postfix/oqmgr[3096]: D9AF313ED0D: from=<[email protected]>, size=1329, nrcpt=1 (queue active)
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: warning: hostname 217-221-73-77-static.albacom.net does not resolve to address 217.221.73.77: Name or service not known
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: connect from unknown[217.221.73.77]
Feb 13 11:26:49 mail dovecot: message repeated 3 times: [ auth: Warning: auth client 0 disconnected with 1 pending requests: EOF]
Feb 13 11:27:23 mail dovecot: lmtp(12507): Connect from local
Feb 13 11:27:24 mail dovecot: lmtp(12507, [email protected]): eXI0OAuKoVjbMAAAiLNN4A: msgid=<[email protected]>: saved mail to INBOX
Feb 13 11:27:24 mail dovecot: lmtp(12507): Disconnect from local: Successful quit
Feb 13 11:27:24 mail postfix/lmtp[12506]: D9AF313ED0D: to=<[email protected]>, orig_to=<postmaster>, relay=mail.montglane.it[private/dovecot-lmtp], delay=0.15, delays=0.04/0.01/0.$
Feb 13 11:27:24 mail postfix/oqmgr[3096]: D9AF313ED0D: removed
Feb 13 11:27:24 mail postfix/submission/smtpd[12499]: warning: unknown smtpd restriction: "permit_sasl_autenticated"
Feb 13 11:27:24 mail postfix/submission/smtpd[12499]: NOQUEUE: reject: RCPT from unknown[217.221.73.77]: 451 4.3.5 Server configuration error; from=<[email protected]> to=<[email protected]$
Feb 13 11:27:24 mail postfix/cleanup[12503]: 2A96D13ED0D: message-id=<[email protected]>
Feb 13 11:27:24 mail postfix/oqmgr[3096]: 2A96D13ED0D: from=<[email protected]>, size=1329, nrcpt=1 (queue active)
Feb 13 11:27:24 mail postfix/submission/smtpd[12499]: disconnect from unknown[217.221.73.77]
Feb 13 11:27:24 mail dovecot: lmtp(12507): Connect from local
Feb 13 11:27:24 mail dovecot: lmtp(12507, [email protected]): fXI0OAuKoVjbMAAAiLNN4A: msgid=<[email protected]>: saved mail to INBOX
Feb 13 11:27:24 mail postfix/lmtp[12506]: 2A96D13ED0D: to=<[email protected]>, orig_to=<postmaster>, relay=mail.montglane.it[private/dovecot-lmtp], delay=0.09, delays=0.02/0/0/0.0$
Feb 13 11:27:24 mail dovecot: lmtp(12507): Disconnect from local: Successful quit
Feb 13 11:27:24 mail postfix/oqmgr[3096]: 2A96D13ED0D: removed
答案1
添加您的验证方法添加到您的/etc/master.cf
文件中。查找类似以下内容的条目:
# # Postfix 主进程配置文件。有关格式的详细信息 # 有关该文件的信息,请参阅 master(5) 手册页(命令:“man 5 master”)。 # # 编辑此文件后,请不要忘记执行“postfix reload”。 # # ========================================================================== # 服务类型 private unpriv chroot wakeup maxproc 命令 + 参数 # (是) (是) (是) (从不) (100) # ========================================================================== smtp inet n - - - - smtpd -o content_filter=垃圾邮件过滤器 #smtp inet n - - - 1 postscreen #smtpd 通过 - - - - - smtpd #dnsblog unix - - - - 0 dnsblog #tlsproxy unix - - - - 0 tlsproxy 提交 inet n - - - - smtpd -o syslog_name=postfix/提交 -o smtpd_tls_security_level =加密 -o smtpd_sasl_auth_enable=是 -o smtpd_client_restrictions=permit_sasl_authenticated,拒绝 # -o milter_macro_daemon_name=起始 # -o syslog_name=postfix/smtps # -o smtpd_tls_wrappermode=是 # -o smtpd_sasl_auth_enable=是 # -o smtpd_client_restrictions=permit_sasl_authenticated,拒绝 # -o milter_macro_daemon_name=起始
对 Postfix 配置进行更改后,请务必重新启动服务。