我在CentOS 6中使用postfix / dovecot构build了自己的邮件服务器,这是我的postconf -n结果:
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no inet_interfaces = localhost inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = example.com myhostname = mail.example.com mynetworks = 168.100.189.0/28, 127.0.0.0/8 myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES relay_domains = sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550
我试过使用telnet来testing我的电子邮件,我把它们放在/ home / user / Maildir / new文件夹中。
我假定邮件服务器一切正常,所以我继续向我的DNS设置添加MXlogging。
这是我第一次使用Cloudflare的免费DNS服务,而且我承认在这方面不是最有知识的人,但是我在那里添加了一些logging:
MXlogging似乎已经到位,一个快速的“挖掘MX example.com”确实运行结果。 现在的问题是…即使我创build的logging为mail.example.com ,通过dig看到的实际条目是dc-8c1937cd-mail.example.com。 ,一个string似乎已被添加到DNSlogging。
我从此尝试从外部来源(而不是telnet)发送电子邮件没有成功。 我需要重新configurationpostfix并将myhostname设置为dc-8c1937cd-mail.example.com。 我是否在DNS的macros伟计划中丢失了某些东西,或者这只是Cloudflare的运作方式? 我的邮件服务器不能正确configuration吗? (从我的远程logintesting看起来很好)
问题是inet_interfaces = localhost
,导致后缀只能监听本地端口25,将其设置为inet_interfaces = all
解决了这个问题。
在CloudFlare DNS设置中,请确保mail
Alogging具有“灰色”云,以便与该主机的连接绕过CloudFlare并直接转到邮件服务器。
除此之外,你的DNS似乎是在一个可行的configuration,你是(自己承认)成功接收邮件。
下一步是检查你的服务器并检查/ var / log / maillog(postfix),也许是dovecot日志。
如果你发送一封邮件给自己进行testing,你应该在后缀日志中看到连接,如果有错误的话。
如果邮件通过后缀由本地处理程序(例如dovecot)获取