我配置了邮件服务器(Ubuntu 18,Postfix,Dovecot,TLS)。我使用MySQL存储电子邮件帐户。似乎[几乎]一切正常。
1)我可以阅读和发送来自本地服务器(Digital Ocean Droplet)的消息
2)我可以使用此工具发送电子邮件-https://www.smtper.net/
3)我可以阅读,但是我无法使用台式机客户端发送电子邮件。
我不明白为什么我可以使用https://www.smtper.net/发送电子邮件,但不能使用eM Client / Thunderbird / Outlook / etc。
smtper.net:
EM客户:
Postfix日志:
Apr 1 15:21:09 mail postfix/smtpd[5904]: connect from unknown[14.139.92.189]
Apr 1 15:21:09 mail postfix/smtpd[5904]: NOQUEUE: reject: RCPT from unknown[14.139.92.189]: 554 5.7.1 <rachel@tyrefors.com>: Relay access denied; from=<d889adfd@farmandhomeoil.com> to=<rachel@tyrefors.com> proto=ESMTP helo=<[14.139.92.189]>
Apr 1 15:21:09 mail postfix/smtpd[5904]: lost connection after DATA from unknown[14.139.92.189]
Apr 1 15:21:09 mail postfix/smtpd[5904]: disconnect from unknown[14.139.92.189] ehlo=1 mail=1 rcpt=0/1 data=0/1 commands=2/4
Apr 1 15:21:41 mail postfix/smtpd[5904]: connect from unknown[115.96.12.129]
Apr 1 15:21:41 mail postfix/smtpd[5904]: NOQUEUE: reject: RCPT from unknown[115.96.12.129]: 554 5.7.1 <rachel@tyrefors.com>: Relay access denied; from=<gli@vcmhk.com> to=<rachel@tyrefors.com> proto=ESMTP helo=<[115.96.12.129]>
Apr 1 15:21:41 mail postfix/smtpd[5904]: lost connection after DATA from unknown[115.96.12.129]
Apr 1 15:21:41 mail postfix/smtpd[5904]: disconnect from unknown[115.96.12.129] ehlo=1 mail=1 rcpt=0/1 data=0/1 commands=2/4
Apr 1 15:25:02 mail postfix/anvil[5906]: statistics: max connection rate 1/60s for (smtp:181.44.252.18) at Apr 1 15:18:42
Apr 1 15:25:02 mail postfix/anvil[5906]: statistics: max connection count 1 for (smtp:181.44.252.18) at Apr 1 15:18:42
Apr 1 15:25:02 mail postfix/anvil[5906]: statistics: max cache size 3 at Apr 1 15:21:41
Apr 1 15:25:14 mail postfix/smtpd[5927]: warning: hostname plain-2574.madpast.com does not resolve to address 45.125.65.50
Apr 1 15:25:14 mail postfix/smtpd[5927]: connect from unknown[45.125.65.50]
Apr 1 15:25:14 mail postfix/smtpd[5927]: lost connection after AUTH from unknown[45.125.65.50]
Apr 1 15:25:14 mail postfix/smtpd[5927]: disconnect from unknown[45.125.65.50] ehlo=1 auth=0/1 commands=1/2
Postfix main.cf:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
# TLS parameters
smtpd_use_tls=yes
smtpd_tls_auth_only = yes
smtpd_tls_cert_file=/etc/letsencrypt/live/mail.domain.is/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/mail.domain.is/privkey.pem
smtp_tls_security_level=may
#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=no
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# 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
myhostname = mail.domain.is
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
relayhost =
#mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks = 127.0.0.0/8 10.0.0.0/8 172.0.0.0/8 [::]/128 [::ffff:127.0.0.0]/104 [::1]/128 93.170.67.25 45.125.65.50
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_domains = mysql:/etc/postfix/mysql-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-users.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-aliases.cf
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination
message_size_limit = 52428800
答案 0 :(得分:0)
这对我有帮助->为Postfix启用提交端口支持
https://major.io/2007/07/04/enable-submission-port-587-in-postfix/