Postfix Email Piping to run a script

August 20, 2014 3.3k views


I have setup an Ubuntu 12.04.5 LTS LAMP Server and configured Postfix.

Firstly, I'm able to send mails to Yahoo & Gmail users, but those Outlook mails are sent but not received :( Any clues?

Also, my prime objective to install postfix is to utilize email piping for running a PHP script. I tried to configure Email Piping using this tutorial. But when I send mail to my Postfix Server, nothing happens. Although the script inside /var/www is running perfectly with >php postfix.php. It means piping configuration is not correct.

I have used mypipe in place of myhook as per the Email Piping tutorial. Being a noob, I couldn't understand what is "dummy" in the content_filter= line syntax. Also, I'm not sure what is "www-data" in the user= line syntax. I used my defined linux username in place of www-data.
Query: Is dummy a shell in /etc/shells? Do I need to add this as a shell before using it in postfix?
Query: Is www-data some user that is to be used as it is, in place of 'mylinuxuser'? Do I need to create www-data as a user or just use it as it is in the config?

Strangely, I ran this test a day ago and tried to automatically forward mails from my account and received a delivery delay message. Now when I destroyed my droplet and reinstalled complete configuration, I receoved yesterday's messages into /var/mail/'user'.

After recent installation, I sent few test mails to my 'user'@'mydomain'.com (from But new mails are neither visible in /var/mail/'user' nor the incoming mail ran the script as planned. :(

And now I'm stuck. Any help would be highly appreciated!

Just to confirm, I have UFW & Fail2Ban installed. I have allowed port 25 in UFW but didn't touched Fail2Ban config (other than 'destemail').

PS: If I fail, I will be forced to use cPanel (incurring extra cost), which would actually destroy the very purpose of using DigitalOcean VPS. I don't want to install any Control Panel not just it would increase running costs but also they install/configure many such softwares which are not at all required for my project.

I have only installed Postfix and nothing else for Email piping. If I need something else too, then please advice!


1 Answer


Can anyone please help me here? Please......

Have another answer? Share your knowledge.