Postfix not sending mail


I have a virtualmin server on CentOS 6.3 (Final).
The domain’s email is hosted by Google so I don’t need to host email. However, the domain is a PHP domain that needs to send alert emails.

Don’t want to bore you with the script, but this is the command code:

echo mail(‘’, ‘My Subject’, $message,$headers) or die(‘boo’);

And email doesn’t go out.
So, I used my own syntax from the bash prompt:

mail -s “Test”

And I see the following error in maillog:
Nov 20 05:11:35 dev postfix/pickup[9113]: B2F04DF85: uid=502 from=
Nov 20 05:11:35 dev postfix/cleanup[9576]: B2F04DF85:
Nov 20 05:11:35 dev postfix/qmgr[9114]: B2F04DF85:, size=438, nrcpt=1 (queue active)
Nov 20 05:11:35 dev postfix/error[9578]: B2F04DF85:, relay=none, delay=0.12, delays=0.08/0.01/0/0.03, dsn=5.0.0, status=bounced (User unknown in virtual alias table)
Nov 20 05:11:35 dev postfix/cleanup[9576]: C74AADF8B:
Nov 20 05:11:35 dev postfix/bounce[9579]: B2F04DF85: sender non-delivery notification: C74AADF8B
Nov 20 05:11:35 dev postfix/qmgr[9114]: C74AADF8B: from=<>, size=2210, nrcpt=1 (queue active)
Nov 20 05:11:35 dev postfix/qmgr[9114]: B2F04DF85: removed
Nov 20 05:11:36 dev postfix/local[9580]: C74AADF8B:, relay=local, delay=0.38, delays=0.02/0.01/0/0.34, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Nov 20 05:11:36 dev postfix/qmgr[9114]: C74AADF8B: removed has the hostname as

Please help!

Oh, and during the script being tested “Mail for domain” was enabled. But I read somewhere on the forum that it needs to be enabled to handle inbound mail. So, I disabled “Mail for domain”. Restarted postfix manually on the server as well. Nogo.


Hmm, did you send that message to “”, or “”?

It looks as if it’s trying to deliver to “”.

But yeah, as you mentioned – the Mail for Domain feature would need to be disabled for any Virtual Server that isn’t hosting email locally.

The same goes for DNS – if you’re not using your server as a nameserver, you would want to disable the “DNS Domain” feature.

If you are using your server as a nameserver, you’d want to make sure that the MX records are setup to point to your actual mail server, rather than your Virtualmin server.


Sending it to and I see it’s sending it to, don’t know why…

Any suggestions?

“Hostname” is a placeholder for the hostname of your server?

If Postfix changes the destination host like that, there has to be some kind of rewrite/redirect configured in Postfix. I don’t know its intricacies well enough to say “it must be there or there”. So you might want to go through its configuration, either in Webmin’s GUI, or by grepping for “” in all files in /etc/postfix, to see if there is any kind of mapping that might cause this redirection.

Yes, hostname is a fictitious name for the real hostname I have on our server, for privacy reasons.

Okay, did you check your Postfix config like I suggested? grep "yourhostname" /etc/postfix/* should turn up something.

It’s in as:

mydestination = $myhostname, localhost.$mydomain, localhost,