Results 1 to 5 of 5
Hello Everyone,
I am having a heck of a time trying to get the permissions set correctly to get postfix to pipe an email to a script I have. Basically, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-19-2010 #1Just Joined!
- Join Date
- Nov 2009
- Posts
- 14
Postfix Permissions
Hello Everyone,
I am having a heck of a time trying to get the permissions set correctly to get postfix to pipe an email to a script I have. Basically, what I am trying to do is pipe emails to a php script which needs access to write files. Right now everything works except for actually writing something (the script can do everything else, Ie. send email with the mail() function and calculate values from the piped message).
So for the last 8 hours I have been trying to figure out how the permissions thing actually works for piped email. Here is my master.cf line for the actual piping:
I have chmoded pipe.php to 777, chowned the owners, etc.PHP Code:myscript unix - n n - - pipe
user=postfix argv=/var/www/pipe.php
The script doesn't have to be in the web directory, but I was using it to check for errors via my web browser. Additionally, if I execute my script via webbrowser, I get the expected result I would like which really links me to this being a permissions problem.
Could someone please point me in the right direction to allow the pipe.php file to write files?
Thank you very much in advance,
noop
- 11-23-2010 #2Just Joined!
- Join Date
- Nov 2009
- Posts
- 14
May I please bump? Even if you don't know what the fix is, I am willing to give anything a shot.
Thanks!
noop
- 11-24-2010 #3
There should be errors in maillog, if the script is bombing out in postfix. Are there problem permissions that will keep the user(s) you are invoking the script as writing to the destination folder?
linux user # 503963
- 11-25-2010 #4Just Joined!
- Join Date
- Nov 2009
- Posts
- 14
I have tried creating folders that would allow the script to execute/write (even moved the file into the directory where the actual mailing script is and chmoded the script to have all prviliages)
I hate to ask this, but do you have a step-by-step guide on how to create some sort of test folder to definitely make sure it is this permissions thing? I have checked the logs and they show nothing out of the ordinary which makes me believe that this has to be permission based. Additionally, I tried executing the script through the web browser and it worked flawless. So again, that kind of puts a +1 on the idea that I have incorrect permissions executing this thing.
Thank you for replying, I really appreciate it
noop
P.S. Your avatar kicks some shiny metal you know what
- 11-26-2010 #5
well if that is a php script you may need to invoke the php interpreter.
apache understands php, in the shell you have to invoke /usr/bin/php or whatever so try something like:
argv=/usr/bin/php /path/to/pipe.phplinux user # 503963


Reply With Quote
