Author Topic: Email Auto Responders mysql-virtual_vacation.cf: Permission denied  (Read 818 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Email Auto Responders mysql-virtual_vacation.cf: 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/mysql-virtual_vacation.cf: 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/mysql-virtual_vacation.cf| awk {'print $3'}");

In vacation.php if I manually set $postfix_password to the password in mysql-virtual_vacation.cf 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/mysql-virtual_vacation.cf| 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 mysql-virtual_vacation.cf and thus returns an empty value making vaction.php fail correctly.

file permissions are as follow:
vacation root vacation.php
root mail mysql-virtual_vacation.cf

/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.

Thanks


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

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