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