G
gregi
Guest
Hello all
I'm encountering a strange problem. When I call mail.sh from the Shell like below, the redirection works just well:
sudo /usr/local/psa/bin/mail -u [email protected] -redirect true -rediraddr [email protected]
And by invoking:
sudo /usr/local/psa/bin/mail -u [email protected] -redirect false
the redirection gets removed as well.
Now the strange thing is, when I invoke the very same commands from a PHP script using the exec() or system() function, the mail-script returns in both cases SUCCESS, the redirection is sucessfully created after the first command, but not removed after the second command - although mail -i [email protected] tells me that the redirection *is* removed, even the Plesk Interface tells me that. But it isn't, since I get the mails redirected furthermore
There is no chance now to remove the redirection than by redoing the redirection command from the Shell and re-removing it form the shell (this does also work from the Plesk-Interface). Just doing the remove-command from the shell doesn't help, I have to do both in order to get the redirection removed.
By the way, my /etc/sudoers contains
apache ALL= NOPASSWD: /usr/local/psa/bin/mail *
The sudo-thing is working, since when doing the same procedure above not with the apache-user but with another unprivileged user (after changing the /etc/sudoers of course), everything works es expected.
Now does anyone have an idea about this strange behaviour?
Thanks in andvance and greetings from switzerland
Greg
I'm encountering a strange problem. When I call mail.sh from the Shell like below, the redirection works just well:
sudo /usr/local/psa/bin/mail -u [email protected] -redirect true -rediraddr [email protected]
And by invoking:
sudo /usr/local/psa/bin/mail -u [email protected] -redirect false
the redirection gets removed as well.
Now the strange thing is, when I invoke the very same commands from a PHP script using the exec() or system() function, the mail-script returns in both cases SUCCESS, the redirection is sucessfully created after the first command, but not removed after the second command - although mail -i [email protected] tells me that the redirection *is* removed, even the Plesk Interface tells me that. But it isn't, since I get the mails redirected furthermore
There is no chance now to remove the redirection than by redoing the redirection command from the Shell and re-removing it form the shell (this does also work from the Plesk-Interface). Just doing the remove-command from the shell doesn't help, I have to do both in order to get the redirection removed.
By the way, my /etc/sudoers contains
apache ALL= NOPASSWD: /usr/local/psa/bin/mail *
The sudo-thing is working, since when doing the same procedure above not with the apache-user but with another unprivileged user (after changing the /etc/sudoers of course), everything works es expected.
Now does anyone have an idea about this strange behaviour?
Thanks in andvance and greetings from switzerland
Greg