Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to send an email, through PHP, to an info@ account for the site. The mail function returns true, but the email fails to send.

The server is CentOS 5, and is utilizing postfix for the SMTP server. I can see that the message is added to the queue, but then fails with a "User unkown in virtual alias table" error. After reading the Virtual Readme file, I think postfix is trying to deliver the message locally, because the sending server and the host server of the domain are the same.

The mail is hosted with Google, and I would like to have the mail for the info@ account be delivered there instead of on the local server. How do I configure postfix to do this?

share|improve this question

migrated from Sep 8 '11 at 2:07

This question came from our site for professional and enthusiast programmers.

Can you show the output of postconf -n? – bahamat Sep 8 '11 at 5:50
up vote 1 down vote accepted

If you try to send a mail for and the domain is at Googlemail then you are not allowed to mention in mydestination= and in virtual_domains=. Otherwise Postfix thinks it should deliver the mail locally. But you want Postfix to relay the mail externally.

And exactly this is described in section "Canonical versus hosted versus other domains".

share|improve this answer
The domain was listed in the virtual_alias_maps file. I made sure it was not listed in mydestination=, but misunderstood how virtual aliases worked when I read the documentation. Cheers. – emarcee Sep 14 '11 at 21:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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