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 have some server running qmail, with many users/domains configured via plesk. I would like to get emails from specified address delivered to one of my users being feed to shell command, as addition to normal delivery. So, basically, I have some shell script, and I'd like qmail to invoke my script with the email, and the continued with delivery as usual.

If necessary, I can do recipient/sender filterind on script side, though it could be more efficient and cleaner, if qmail would feed only correct emails to my script.

Anyway, how to accomplish that?

share|improve this question

You can use dot-qmail files. Literally, you would just prefix the first line with a | and run it through a command. The second line would specify the user to deliver the mail to.

For example:


This would pipe all e-Mail through procmail and then deliver to the local system user user1.

share|improve this answer

Your Answer


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