我在用着:
# cat /etc/*release
CentOS release 6.3 (Final)
# rpm -qa | grep post
postfix-2.6.6-2.2.el6_1.x86_64
在2台服务器上:首选网站和(是的,有趣的名字)静态.103.78.9.176.客户端.你的服务器.de
我拥有多个域名,并希望所有发往这些域名的邮件都转发到我的 Gmail 地址。
因此,我已经为我的域名设置了 MX 记录:
# host videoskat.de
videoskat.de has address 176.9.40.169
videoskat.de mail is handled by 100 static.103.78.9.176.clients.your-server.de.
videoskat.de mail is handled by 10 preferans.de.
# host balkan-preferans.de
balkan-preferans.de has address 176.9.40.169
balkan-preferans.de mail is handled by 100
static.103.78.9.176.clients.your-server.de.
balkan-preferans.de mail is handled by 10 preferans.de.
我在两台服务器上都添加了:
# head /etc/postfix/virtual
@balkan-preferans.de [email protected]
@videoskat.de [email protected]
# postmap /etc/postfix/virtual
# postmap -q "@videoskat.de" /etc/postfix/virtual
[email protected]
并已开放端口二十五在防火墙中:
# grep -w 25 /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp -m multiport --dports 25,22 -j ACCEPT
但现在当我发送邮件到[电子邮件保护]Postfix 日志中没有任何内容可看:
# sudo tail /var/log/maillog
Jan 15 10:50:42 postfix/postfix-script[1401]: starting the Postfix mail system
Jan 15 10:50:42 postfix/master[1402]: daemon started -- version 2.6.6,
configuration /etc/postfix
所以我可能遗漏了一些小事情?
顺便说一句,两台服务器的每日日志监控邮件都能顺利到达我的 Gmail 收件箱[电子邮件保护]
更新2:
我已将以下两行添加到/etc/postfix/main.cf
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, videoskat.de, balkan-preferans.de
现在我看到了传入连接/var/log/maillog
,但它们被拒绝了:
postfix/smtpd[3209]: NOQUEUE: reject: RCPT from static.114.69.9.176.clients.your-server.de[176.9.69.114]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<www>
postfix/smtpd[3209]: disconnect from static.114.69.9.176.clients.your-server.de[176.9.69.114]
输出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
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, videoskat.de, balkan-preferans.de
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
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
什么是本地收件人表中存在未知用户拒绝日志消息中的意思是什么?
答案1
如果有没有什么在邮件日志中,则没有邮件发送到您的服务器。
您显示的 MX 记录意味着只要 preferans.de 回复邮件,就永远不会使用第二个 MX。
请在您的帖子中附上输出postconf -n
,以便我们知道您在说什么。
拒绝日志消息中的本地收件人表中的用户未知是什么意思?
据记载,postfix 默认拒绝发送未知本地收件人的邮件。您应该事先定义任何有效的收件人。
由于您的 main.cf 缺少virtual_alias_maps
条目,因此您的虚拟文件未被使用;将以下内容添加到 main.cf 并重新加载:
virtual_alias_maps = /etc/postfix/virtual