Symptoms
If you configure an email account with /bin/bash
as its shell, then create a forwarder for that account that pipes to a PHP script, Exim may kill off the script.
Description
Email accounts should use the main account's home directory for their shell. However, if you set an email account to use /bin/bash
for its shell, then configure a forwarder for that email account that pipes to a PHP script, Exim may kill off the script with an error like this in the Exim log:
2020-09-13 23:10:02 1kHTdi-0000VB-6l ** |/usr/local/bin/php -q /home/cptest/public_html/support/console/index.php (support@cptest.tld) R=virtual_aliases_nostar T=virtual_address_pipe: Child process of virtual_address_pipe transport (running command "/usr/local/bin/php -q /home/cptest/public_html/support/console/index.php") was terminated by signal 9 (Killed)
And the sender may receive a bounceback message like this:
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
pipe to |/usr/local/bin/php -q /home/cptest/public_html/support/console/index.php
generated by support@cptest.tld
local delivery failed
Workaround
Set the email account's shell to the main account's home directory in the domain email-password file:
support:x:32003:32004::/home/cptest/mail/cptest.tld/support:/home/cptest
Comments
0 comments
Article is closed for comments.