server - Dovecot,后缀 - 无法接收到我的服务器的任何电子邮件
问题描述
我的 postfix 或 dovecot 有问题。我正在尝试使用 postfix、dovecot、roundcube 创建一个邮件服务器。
但我可以将邮件发送到我的 gmail,但我无法从 gmail 发送到我的服务器。
在我的(/etc/postfix/main.cf)里面
queue_directory = /var/spool/postfix
mail_owner = postfix
myhostname = domain.com
mydomain = domain.com
myorigin = /etc/mailname
inet_interfaces = localhost
#mydestination = localhost.$mydomain, localhost, $mydomain
mydestination = localhost, localhost.localdomain
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 xx.xx.xx.xx/26
#relayhost =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
recipient_delimiter =
#home_mailbox = Maildir/
home_mailbox =
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/sbin/newaliases
mailq_path = /usr/sbin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = no
inet_protocols = ipv4
message_size_limit = 25600000
maximal_queue_lifetime = 1d
biff = no
# Virtual domains, users, and aliases
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_maps = hash:/etc/postfix/virtual/addresses
smtpd_tls_cert_file=/etc/postfix/ssl/mailserver.csr
smtpd_tls_key_file=/etc/postfix/ssl/mailserver.pem
smtpd_use_tls=no
smtpd_tls_auth_only = no
smtpd_client_restrictions =
#Enabling SMTP for authenticated users.
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = no
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination,
check_policy_service inet:127.0.0.1:10023n
smtpd_helo_required = yes
smtpd_helo_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_non_fqdn_helo_hostname
reject_unknown_helo_hostname
smtpd_sender_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unknown_sender_domain
reject_unknown_reverse_client_hostname
reject_unknown_client_hostname
#check_sender_access hash:/etc/postfix/sender_access
smtpd_relay_restrictions =
permit_mynetworks,
reject_unauth_destination
virtual_transport = lmtp:unix:private/dovecot-lmtp
compatibility_level = 2
mailbox_size_limit = 0
我在这里查看了(tail -f /var/log/mail.log)错误:
Aug 6 14:18:20 hvass dovecot: imap-login: Login: user=<postmaster@domain.com>, method=PLAIN, rip=::1, lip=::1, mpid=1818, secured, session=<uq/80XGPwLkAAAAAAAAAAAAAAAAAAAAB>
Aug 6 14:18:20 hvass dovecot: imap(postmaster@domain.com): Debug: Effective uid=5000, gid=5000, home=/var/mail/vhosts/domain.com/postmaster
Aug 6 14:18:20 hvass dovecot: imap(postmaster@domain.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/mail/vhosts/domain.com/postmaster
Aug 6 14:18:20 hvass dovecot: imap(postmaster@domain.com): Debug: maildir++: root=/var/mail/vhosts/domain.com/postmaster, index=, indexpvt=, control=, inbox=/var/mail/vhosts/domain.com/postmaster, alt=
Aug 6 14:18:20 hvass dovecot: imap(postmaster@domain.com): Logged out in=50 out=490
我查看了我的日志,我什么也看不到。
我有开放端口:(https://www.arclab.com/en/kb/email/list-of-smtp-and-pop3-servers-mailserver-list.html)
有人可以帮我吗?谢谢 :)
编辑 6/07-2019 - 15:58
我正在尝试 telnet 收到此错误:
Frederiks-MacBook-Pro:~ frederikfrandsen$ telnet domain.com 25
Trying 100.68.184.44...
telnet: connect to address 100.68.184.44: Connection refused
telnet: Unable to connect to remote host
编辑 6/07-2019 - 16:07
我运行这个命令:
sudo dpkg-重新配置后缀
现在我可以远程登录到我的服务器:
Frederiks-MacBook-Pro:~ frederikfrandsen$ telnet domain.com 25
Trying 100.68.184.44...
Connected to domain.com.
Escape character is '^]'.
220 domain.com ESMTP Postfix
编辑 6/07-2019 - 16:29
我向我的服务器发送了一个 telnet,但 google gmail 在这里得到了这个错误:
host gmail-smtp-in.l.google.com[108.177.127.26] said:
550-5.7.1 [185.107.12.164 11] Our system has detected that this
message is 550-5.7.1 not RFC 5322 compliant: 550-5.7.1 'From' header is
missing. 550-5.7.1 To reduce the amount of spam sent to Gmail, this message
has been 550-5.7.1 blocked. Please visit 550-5.7.1
https://support.google.com/mail/?p=RfcMessageNonCompliant 550 5.7.1 and
review RFC 5322 specifications for more information. f20si30711503edy.431 -
gsmtp (in reply to end of DATA command)
编辑 6/07-2019 - 16:50
抱歉,我在本地网络上,这就是 telnet 工作的原因。
编辑 6/07-2019 - 17:51
这是我的防火墙/端口转发。现在它可以工作了:)
编辑 6/07-2019 - 19:51
现在可以了,新问题我无法从 gmail 发送到我的服务器。知道为什么吗?
编辑 6/07-2019 - 20:11
我正在尝试连接到(telnet domain.com 25):
客户端主机被拒绝:找不到您的反向主机名
编辑 7/07-2019 - 12:01
我是我的 dns serer,我等到今天,现在它可以 100% 工作了 :)
编辑 8/07-2019 - 18:15
我有新的问题,我无法从 iphone 发送电子邮件到 www
致命:无效的“-o smtpd_client_restrictions”选项值:属性名称后缺少“=”
编辑 8/07-2019 - 19:08
日志显示:
Aug 8 19:05:40 hvass postfix/submission/smtpd[11525]: lost connection after EHLO from unknown[185.107.12.164]
Aug 8 19:05:40 hvass postfix/submission/smtpd[11525]: disconnect from unknown[185.107.12.164] ehlo=1 commands=1
Aug 8 19:05:55 hvass postfix/submission/smtpd[11525]: connect from unknown[185.107.12.164]
编辑 8/07-2019 - 19:24
telnet:无法解析 domain.com/25:名称或服务未知
编辑 8/07-2019 - 20:27
我得到:中继访问被拒绝使用 https://mxtoolbox.com/SuperTool.aspx?action=smtp%domain.com&run=toolpage#
编辑 9/07-2019 - 14:00
我正在使用:https ://www.wormly.com/test-smtp-server
SERVER -> CLIENT: 454 4.7.0 TLS not available due to local problem
SMTP ERROR: STARTTLS command failed: 454 4.7.0 TLS not available due to local problem
2019-08-09 11:57:38 SMTP Error: Could not connect to SMTP host.
有人能帮我吗?我的服务器上有 tls。
编辑 9/07-2019 - 15:23
我得到了新的错误:
dovecot:imap-login:断开连接(尝试使用不允许的明文身份验证)
编辑 9/07-2019 - 16:24
我在这里编辑文件:
/etc/dovecot/conf.d/10-auth.conf 也编辑 -> disable_plaintext_auth = no
它现在可以在我的 iPhone 上运行!
但不适用于安卓!
有人能告诉我为什么吗?
解决方案
推荐阅读
- c++ - C++ 中正确的 typedef 位置
- java - Java程序查找二次方程的整数根
- c# - 在位图上绘制有角度的矩形
- javascript - 使用 ngb-carousel 在单个滑块页面中显示多张图片
- c# - Edge 在重新加载时显示带有“#”符号的空白页
- c# - C# 和 Python 之间的持续通信
- express - 如何防止 mini-css-extract-plugin 创建 js entrypint
- java - Spring - 为每个 bean 使用不同的属性文件
- tree - 如何在 Angular 5 中创建自定义嵌套节点树?我是角度的初学者。我不知道
- python - ValueError:输入 0 与层 lstm_1 不兼容:预期 ndim=3,发现 ndim=2