Skip to content
Advertisement

Email pipe script runs as nobody instead of real user in postfix [closed]

I am creating a script that will run when email is received to postfix it will execute.

This script always runs as nobody user. How can I change that it runs as real user that exists on operating system like ‘ubuntu’. Due to the script running as nobody I am running into directory permission issues as I am parsing email attachments and saving them to server.

So please let me know how can execute the script as real user instead of nobody.

I have tried chown and chmod on script but still it runs as nobody.

Thank you for the help.

Advertisement

Answer

Got that working. Found out that postfix configuration has a property to set to execute script as. It is in main.cf Once you specify default_privs=www-data in main.cf of postfix configuration and then reload/restart postfix it runs the piped script as www-data user.

Hope that it helps out someone in future.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement