邮件服务器从远程 telnet 会话接收电子邮件,但不从 gmail 接收电子邮件

邮件服务器从远程 telnet 会话接收电子邮件,但不从 gmail 接收电子邮件

我成功地通过 telnet 端口 25 从本地计算机向运行 postfix/dovecot 的远程服务器发送了邮件。该电子邮件成功到达了计算机上的用户邮箱。

但是,当尝试使用 Gmail 向同一个用户发送邮件时,却没有任何电子邮件的踪迹。

主文件:

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

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2



# 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

# 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.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = example.com
mydomain = example.com
mydestination = $myhostname, ip-173-31-0-112.ec2.internal, localhost.ec2.internal, localhost, $mydomain, localhost.$mydomain
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
local_recipient_maps = proxy:unix:passwd.byname $alias_maps

邮件服务器位于 mail.theomnihealthgroup.com。telnet 会话在此处:

Trying 3.95.150.105...
Connected to mail.theomnihealthgroup.com.
Escape character is '^]'.
220 mail.theomnihealthgroup.com ESMTP Postfix (Debian/GNU)
ehlo mail.theomnihealthgroup.com
250-mail.theomnihealthgroup.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
mail from: [email protected]
250 2.1.0 Ok
rcpt to: [email protected]
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject: check it

awesome
.
250 2.0.0 Ok: queued as B03C9802BF
quit
221 2.0.0 Bye
Connection closed by foreign host

答案1

您的 MX 记录不正确。

$ host -t mx theomnihealthgroup.com
theomnihealthgroup.com mail is handled by 1 mail.

但您的邮件服务器位于mail.theomnihealthgroup.com

编辑您的 DNS MX 记录来纠正此问题。

相关内容