We help IT Professionals succeed at work.

Check out this week's podcast, "Dairy Farms to Databases: Community's Hand in Technology"Listen Now


pipe email to php script postfix

Last Modified: 2014-12-05
First of all please allow me to say that I am very new to linux and ubuntu and postfix.

I am trying to create a mail server that will accept all mail from a bunch of fictitious email addresses but instead of postfix delivering these to a mailbox, I want the emails to be redirected to a PHP script. From there I will handle the emails in PHP and take care of the contents. I do not want anything stored in postfix mailboxes.

So far I've been able to fire up a ubuntu box, install postfix and get postfix to not throw errors when i telnet on port 25 from my windows machine and try to send it mail using the following tutorial.

The problem I have is that the email is not being redirected to the php script and I can't figure out how to change that.

I've been following just about every tutorial there is out on the web but all of them have gaps in their instructions as they assume you are already an advanced linux or postfix user. The best one I've found so far is here but I cannot su www-data as I'm getting the following error;

This account is currently not available.

Open in new window

Also when emails get "delivered" to postfix, I am getting the following error;

Aug  1 10:49:46 BMPOSTFIX01 pipe[2082]: fatal: pipe_command: execvp /path/to/file/postfix1.php: Permission denied

Open in new window

Please help!
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)


Where do U currently stand on this? How did U solve it?

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.