I've configured PostFix as a null client on my machine as it's said here.

But some mail got bounced. I checked log and found there, that "from" values equal script username on the machine, not email address in the email:

Apr 25 13:12:22 server2 postfix/qmgr[1598]: C3937504B8049: from=<vipsup@gsmforum.ru>, 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=<gsmbaza@gsmforum.ru>, 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=<vipsup@gsmforum.ru>, 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=<vipsup@gsmforum.ru>, 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=<gsmbaza@gsmforum.ru>, 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=<gsmbaza@gsmforum.ru>, size=722, nrcpt=1 (queue active)
Apr 25 13:15:13 server2 postfix/qmgr[1598]: 29CA1504B8049: from=<>, size=2620, nrcpt=1 (queue active)

Emails got bounced like this:

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=<20110425091723.8d2335c96ee9@www.vipgsmsupport.com>
Apr 25 13:17:24 server2 postfix/qmgr[1598]: 2F33F504B8045: from=<vipsup@gsmforum.ru>, size=2033, nrcpt=1 (queue active)
Apr 25 13:17:24 server2 postfix/smtp[4231]: 2F33F504B8045: to=<reandoynthea@hotmail.com>, relay=mx.yandex.ru[]:25, delay=0.47, delays=0.27/0/0.12/0.08, dsn=5.7.1, status=bounced (host mx.yandex.ru[] said: 550 5.7.1 No such user! (in reply to RCPT TO command))

How do I setup postfix correctly?

Email is sent by php scripts using "sendmail" binary (postfix replacement of it).

PostFix configuration:

[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 =
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
  • Please show output of postconf -n. – AlexD Apr 25 '11 at 14:14

To set From: e-mail address you need to use -f option for sendmail binary.

Second bounce probably caused by relay_host pointing to server (mx.yandex.ru) which doesn't relay mail for your server.

  • Sometimes I cannot use -f everywhere. And does it really affect STMP MAIL FROM command? relayhost is commented in config file. – Vladislav Rastrusny Apr 25 '11 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.