Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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:

|/usr/bin/procmail
&user1

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

share|improve this answer

Your Answer

 
discard

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