我有以下问题,我有一个Centos 5.4 VPS托pipe几个nginx网站(一些静态,一些cakephp),我希望能够通过postfix发送电子邮件从每个网站的联系页面到我的谷歌应用程序托pipe电子邮件(不同的帐户为每个网站),以便应用程序可以发送一个自动电子邮件的人填写联系表格等
我有一个简单的后缀安装与以下添加到main.cfconfiguration文件。 从使用本指南
virtual_alias_domains = hash:/etc/postfix/virtual_alias_domains virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps
(这些文件都使用postmap转换为db文件)
我为每个站点正确configuration了DNS,并设置了SPFlogging。 (我知道R-DNS仍然会引用我的实际主机名而不是域名,并导致一个可能的垃圾邮件问题,但一次一件事)
我可以telnet localhost和helo localhost,以便我可以发送一个命令行电子邮件从virtual_alias_domains中的地址到virtual_alias_maps文件中的电子邮件,似乎发送没有给出错误,但它发送到我的本地linux帐户不是电子邮件地址指定。
我的问题是我认为这是错误的方式在虚拟别名映射方面,或者甚至可能做的方式即时尝试。 任何帮助非常感谢,谢谢。
我的postconf -noutlook如下所示
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 html_directory = no inet_interfaces = localhost mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost myhostname = myactual hostname mynetworks = 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.3.3/README_FILES sample_directory = /usr/share/doc/postfix-2.3.3/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550 virtual_alias_domains = hash:/etc/postfix/virtual_alias_domains virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps
会出现我试图以一个非常复杂的方式做到这一点。
这个指南似乎工作, sudhanshuraheja.com
我所做的只是宣布我的实际主机名,并改变我的指导build议,即时通讯设置去,我可以指定的地址和所有好…………
virtual_alias_maps / domains仅用于传入电子邮件。 如果你打算使用你的Postfix安装发送电子邮件,你根本不需要Postfix的虚拟主机。 只要确保你没有configurationPostfix接受本地发送的邮件,发送给必须发送给世界其他地区的域名。
编辑:不,我从main.cf中的评论谈论mydestination ,
# The mydestination parameter specifies the list of domains that this # machine considers itself the final destination for. # # These domains are routed to the delivery agent specified with the # local_transport parameter setting. By default, that is the UNIX # compatible delivery agent that lookups all recipients in /etc/passwd # and /etc/aliases or their equivalent.
所以你不想要你想发送电子邮件的任何域名被列在你的mydestination 。 如果是,电子邮件将在本地交付。
inet_interfaces仅用于接收。 当您的configuration工作正常时,您可以尝试不听任何公共接口,以使您的安装更安全。 我不完全确定所有公共接口禁用此function的副作用是什么。