我通过 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。远程登录会话在这里:
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
您的 MX 记录不正确。
但是您的邮件服务器位于
mail.theomnihealthgroup.com
.编辑您的 DNS MX 记录以更正此问题。