postfix pipe to script: execvp permissions denied error-Collection of common programming errors
I am new to postfix and am trying to pipe a message to a particular email address to a bash script. I am running CentOS 6 in case that matters.
My script has 777 permission (for testing), and when I email to the test account I see that postfix tries to run the script. This is the relevant line from the maillog:
Feb 16 15:08:40 lserver2 postfix/local[19675]: F4045103000: to=, orig_to=, relay=local, delay=1737, delays=1737/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: local: fatal: execvp /data/scripts/testscript: Permission denied )*
This looks like a permissions issues. When I try to run my script as us ‘postfix’ or ‘nobody’ I get the error: This account is currently not available.
I’m not sure where to go from here….I’ve read several posts that don’t give a clear next step. (I don’t want to redirect ALL mail to a script, and one answer looks WAY to complicated for something so simple)