system not sending vacation message

Started by eworbit, September 26, 2018, 02:46:22 PM

Previous topic - Next topic

eworbit

The system is not sending a vacation message back.  All I seen in /var/log/maillog is where the incomming mail is getting "piped" to the vacation mechanism:
Sep 25 15:04:12 mail postfix/pipe[23896]: 050E720B1A3B: to=<me#mydomain.com@autoreply.mail.mydomain.com>, relay=vacation, delay=0.08, delays=0.02/0.02/0/0.04, dsn=2.0.0, status=sent (delivered via vacation service)

As a test, I copied the /etc/postfix/vacation.php script over to a junk.php and manual ran it and it did send back a vacation message.  I'm just wondering why the sender is not getting a vacation message through the postfix delivery process.

Any ideas?

eworbit

Getting closer to answering my own question:

At the top of the script, the shell_exec must be restricted and therefore can't fetch the mysql password.
$postfix_password = shell_exec("grep '^password' /etc/postfix/mysql-virtual_vacation.cf| awk {'print $3'}");

I hardcoded the mysql password in the script and it autoresponder worked.   The script is running as the "nobody".

studio4host

you should rebuild your mail server from the cwp mailserver manager to get new config as this part was changed/update and has improved security.
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.

eworbit

The rebuild fixed the mysql-virtual_vacation.cf to the correct permissions:
-rw-r-----  1 vacation mail   203 Sep 27 17:21 mysql-virtual_vacation.cf

But, I didn't like how it lost my custom transport, mynetworks and main.cf settings.    Good thing I had them documented.