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 need to run a script everytime there is an incoming email message to a postfix email server. I have read the docs but I was wondering what would be the best approach to do this. Would anybody give me some hint or examples on how to do this. The postfix server is running under Ubuntu.

Thanks heaps for your help

share|improve this question
up vote 4 down vote accepted

You could use the After-Queue Content Filter feature:

The readme file contains an example of a very simple filter shell script. You could start with that example and build your own script.

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.