Author Topic: Email Auto Responders Permission denied  (Read 818 times)

0 Members and 1 Guest are viewing this topic.

Email Auto Responders Permission denied
« on: September 27, 2020, 12:11:48 PM »
Hi guys,

Having an issue with Email Auto Responders not working.

Adding the Email Auto Responders works and it is correctly in vaction table of the postfix database. Also the mail gets delivered to the mailbox with auto responder. Only the auto responder email is not sent

This is the error I get in /var/log/maillog :

delivered via vacation service (grep: /etc/postfix/ Permission denied PHP Warning:  mysqli_connect()

I traced the issue to /etc/postfix/vaction.php. On line 12, there is this php command:
$postfix_password = shell_exec("grep '^password' /etc/postfix/| awk {'print $3'}");

In vacation.php if I manually set $postfix_password to the password in it works 100% but I am guessing this is not ideal.

Also creating a php file with the same command: $postfix_password = shell_exec("grep '^password' /etc/postfix/| awk {'print $3'}"); does return the correct value. Running as root

So my next guess is that the the user account that needs to execute vacation.php does not have permissions to access and thus returns an empty value making vaction.php fail correctly.

file permissions are as follow:
vacation root vacation.php
root mail

/usr/local/cwp/php71/bin/php -v
PHP 7.2.30 (cli)

From this point on I am lost. The manual fix does work for now however.


Re: Email Auto Responders Permission denied
« Reply #1 on: September 27, 2020, 09:49:28 PM »
you can use mail server manager in cwp to rebuild the mail will also correct permissions
VPS & Dedicated server provider with included FREE Managed support for CWP.

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.