How to run command in /etc/aliases when recieving mail ?
Issue
I configured /etc/aliases file as below.
# vim /etc/aliases
test: "| /tmp/test.sh"
When I send mail to test user, there is a error.
Dec 21 01:19:55 localhost postfix/local[3081]: 7CB8E1FD: to=<test@test.com>, relay=local, delay=406, delays=406/0.01/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: local: fatal: execvp /tmp/test.sh: Permission denied )
But the permission is 777. Why permission denied?
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
