我在 RHE5 上使用 postfix 2.3.3,因为几周前我们遇到了电子邮件传递问题,具体与外部中继(gmail、hotmail、yahoo)有关。
我做了一些练习:向内部电子邮件地址发送一封电子邮件,并抄送外部地址。
我们用客户端 (Thunderbird) 接收内部邮件没有问题,但是收不到外部邮件 (我查看了垃圾邮件,什么也没有)。我检查了 postfix 日志,它说一切正常。
Aug 29 16:55:43 mail postfix/smtpd[2019]: A1DA879E809: client=unknown[192.168.26.6]
Aug 29 16:55:44 mail postfix/cleanup[2022]: A1DA879E809: message-id=<57C4BB64.7030807@internaldomain>
Aug 29 16:55:47 mail postfix/qmgr[1771]: A1DA879E809: from=<account1@internaldomain>, size=114602, nrcpt=2 (queue active)
Aug 29 16:55:47 mail postfix/smtpd[2019]: disconnect from unknown[192.168.26.6]
Aug 29 16:55:47 mail postfix/local[2032]: A1DA879E809: to=<internaltest@internaldomain>, relay=local, delay=4, delays=4/0.04/0/0.01, dsn=2.0.0, **status=sent** (delivered to maildir)
Aug 29 16:55:53 mail postfix/smtp[2031]: A1DA879E809: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[108.177.11.27]:25, delay=10, delays=4/0.03/2.8/3.3, dsn=2.0.0, **status=sent** (250 Requested mail action okay, completed.)
Aug 29 16:55:53 mail postfix/qmgr[1771]: A1DA879E809: removed
我检查了我们的队列,但似乎没什么问题
qshape deferred
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 7 0 0 0 1 0 0 0 0 0 6
oj.gob.gt 4 0 0 0 0 0 0 0 0 0 4
gmaiil.com 1 0 0 0 0 0 0 0 0 0 1
cocisa.com.gt 1 0 0 0 1 0 0 0 0 0 0
energuate.com.gt 1 0 0 0 0 0 0 0 0 0 1
会发生什么事??
我们的基本 Postfix 配置如下:
alias_maps = hash:/etc/aliases
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mailbox_size_limit = 102400000
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maximal_queue_lifetime = 1d
message_size_limit = 20971520
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = domain
myhostname = mail.domain
mynetworks = 172.16.0.0/23,192.168.0.0/18,127.0.0.0/8
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP Mail Institucional
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_inet_interfaces, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 550
答案1
许多邮件服务器会默默忽略垃圾邮件和它们认为是垃圾邮件的邮件。检查垃圾邮件文件夹,看看您是否已经到了这一步。
查看多年来我们发现了哪些经典答案?并查看电子邮件部分。我写过几篇关于电子邮件的博客文章,其中包括一篇关于运行电子邮件服务器. 尝试向列出的其中一个测试地址发送电子邮件。
如果您正确实施SPF
并DKIM
提供DMARC
报告地址,Gmail 和 Yahoo 可能会向您发送报告,说明您的邮件无法送达的原因。