I configured postfix on my box to call a php script on incoming e-mails, using virtual aliases. The script is being called, but it runs as "nobody" and thus I can't send signals to another program from my script that runs as a real user.

I found the setting default_privs and set it to the user that runs the program I want to signal, and this works, but that still allows me to signal only programs of that one user.

How can I solve this? I guess putting root in default_privs and having the called script su into the appropriate user account would be a stupid move, but what alternatives are there?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

Set a transport in master.cf for piping. There you can set the option user= to run the pipe under that user. Exactly as described in the manual: http://www.postfix.org/pipe.8.html

As stated in the other manual for default_privs: "DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER."

link|improve this answer
So basically there's no short way of doing it? I read that in the manual but just writing it there without providing proper alternatives isn't of much help. – Dexter Dec 16 '11 at 23:22
Why is configuring a transport not the short way? It is a two-liner. – mailq Dec 17 '11 at 22:21
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.