Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have had to transfer one of my sites over to a virtual server on a cloud provider from a shared host. I was planning on leaving the mailboxes on the shared host and just using the cloud for the website. The website is up an running on the server, but is not sending mail.

Postfix is installed and configured as per this question. When I send an email from PHP, including the from address in the headers, it ends up sitting in the postfix queue and staying there. The senders address has also changed to the apache username. My question is how do I configure postfix so that I can send an email, using any from address specified in the PHP script.

My server has a static IP, and the firewall is blocking incoming ports except for 22, 80 and 443.

EDIT: The emails are stuck in the queue with a "connection timed out" message. Further investigation reveals that I cannot telnet into any other mail server on port 25. I have logged a ticket with the cloud provider to get that sorted out.

share|improve this question
possible duplicate of How to setup a Postfix SMTP-only for multiple domains – mailq Aug 30 '11 at 13:06
So what is the question? And where are the error logs? And what is the problem in detail? What concrete configuration do you have? – mailq Aug 30 '11 at 18:06
up vote 0 down vote accepted

The cloud provider was blocking port 25. This was preventing my postfix server from connecting to the mail servers to deliver the mail.

To fix the issue where mail sent by PHP was appearing as having a sender of wwwrun I installed the Pear mail package and used this to send mail.

share|improve this answer

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.