多个域的Postfix空客户端 – 如何?

我已经在我的机器上configuration了PostFix作为空客户端,就像这里所说的那样。

但是一些邮件被反弹了。 我检查了日志,发现在那里,“from”值等于机器上的脚本用户名,而不是电子邮件中的电子邮件地址:

Apr 25 13:12:22 server2 postfix/qmgr[1598]: C3937504B8049: from=<[email protected]>, size=2041, nrcpt=1 (queue active) Apr 25 13:12:23 server2 postfix/qmgr[1598]: 0F175504B804A: from=<>, size=3956, nrcpt=1 (queue active) Apr 25 13:12:50 server2 postfix/pickup[1597]: 23967151C8001: uid=528 from=<gsmbaza> Apr 25 13:12:50 server2 postfix/qmgr[1598]: 23967151C8001: from=<[email protected]>, size=5223, nrcpt=1 (queue active) Apr 25 13:12:50 server2 postfix/qmgr[1598]: A4970504B8049: from=<>, size=7046, nrcpt=1 (queue active) Apr 25 13:13:43 server2 postfix/pickup[1597]: A8DC5504B8049: uid=501 from=<vipsup> Apr 25 13:13:43 server2 postfix/qmgr[1598]: A8DC5504B8049: from=<[email protected]>, size=2029, nrcpt=1 (queue active) Apr 25 13:13:44 server2 postfix/qmgr[1598]: EEBDE504B804A: from=<>, size=3926, nrcpt=1 (queue active) Apr 25 13:14:20 server2 postfix/pickup[1597]: 0743B504B8049: uid=501 from=<vipsup> Apr 25 13:14:20 server2 postfix/qmgr[1598]: 0743B504B8049: from=<[email protected]>, size=2036, nrcpt=1 (queue active) Apr 25 13:14:21 server2 postfix/pickup[1597]: 194FC504B804D: uid=528 from=<gsmbaza> Apr 25 13:14:21 server2 postfix/qmgr[1598]: E5E17504B804A: from=<>, size=3937, nrcpt=1 (queue active) Apr 25 13:14:22 server2 postfix/qmgr[1598]: 194FC504B804D: from=<[email protected]>, size=6419808, nrcpt=1 (queue active) Apr 25 13:14:22 server2 postfix/qmgr[1598]: 9F595504B8045: from=<>, size=2542, nrcpt=1 (queue active) Apr 25 13:15:12 server2 postfix/pickup[1597]: D9879504B8045: uid=528 from=<gsmbaza> Apr 25 13:15:12 server2 postfix/qmgr[1598]: D9879504B8045: from=<[email protected]>, size=722, nrcpt=1 (queue active) Apr 25 13:15:13 server2 postfix/qmgr[1598]: 29CA1504B8049: from=<>, size=2620, nrcpt=1 (queue active) 

电子邮件如此反弹:

 Apr 25 13:17:24 server2 postfix/pickup[4137]: 2F33F504B8045: uid=501 from=<vipsup> Apr 25 13:17:24 server2 postfix/cleanup[4229]: 2F33F504B8045: message-id=<[email protected]> Apr 25 13:17:24 server2 postfix/qmgr[1598]: 2F33F504B8045: from=<[email protected]>, size=2033, nrcpt=1 (queue active) Apr 25 13:17:24 server2 postfix/smtp[4231]: 2F33F504B8045: to=<[email protected]>, relay=mx.yandex.ru[93.158.134.89]:25, delay=0.47, delays=0.27/0/0.12/0.08, dsn=5.7.1, status=bounced (host mx.yandex.ru[93.158.134.89] said: 550 5.7.1 No such user! (in reply to RCPT TO command)) 

我如何正确设置后缀

电子邮件是通过使用“sendmail”二进制文件(后缀replace它)的PHP脚本发送的。

PostFixconfiguration:

 [root@server2 log]# 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 debug_peer_level = 2 debug_peer_list = 127.0.0.1 html_directory = no inet_interfaces = loopback-only local_transport = error:local delivery is disabled mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man myorigin = $mydomain newaliases_path = /usr/bin/newaliases.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 

要设置来自:电子邮件地址,您需要使用sendmail二进制文件的-f选项。

第二个反弹可能是由relay_host指向服务器(mx.yandex.ru)不会中继邮件为您的服务器。