/etc/aliasesの末尾に
vvvvv: "|/usr/bin/php /var/www/vhosts/oreore.com/httpdocs/system/test_aliases.php"
を追記。
#
# Aliases in this file will NOT be expanded in the header from
# Mail, but WILL be visible over networks or from /bin/mail.
#
# >>>>>>>>>> The program "newaliases" must be run after
# >> NOTE >> this file is updated for any changes to
# >>>>>>>>>> show through to sendmail.
#
# Basic system aliases -- these MUST be present.
mailer-daemon: postmaster
postmaster: root
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<vvvvv@smtp.oreore.com>: Command died with status 1: "/usr/bin/php
/var/www/vhosts/oreore.com/httpdocs/system/test_aliases.php". Command
output: Could not open input file:
/var/www/vhosts/oreore.com/httpdocs/system/test_aliases.php
Final-Recipient: rfc822; vvvvv@smtp.oreore.com
Original-Recipient: rfc822;testxxx@oreore.com
Action: failed
Status: 5.3.0
Diagnostic-Code: x-unix; Could not open input file:
/var/www/vhosts/oreore.com/httpdocs/system/test_aliases.php
エラーのCould not open input fileについても、教えて頂いたコマンドを実行した結果権限がないという事が分かりました。
root権限で
php /var/www/vhosts/oreore.com/httpdocs/system/test_aliases.php
を実行する事は出来たのですが
# su - nobody -s/bin/sh
php /var/www/vhosts/oreore.com/httpdocs/system/test_aliases.php
でやると
Could not open input file: /var/www/vhosts/oreore.com/httpdocs/system/test_aliases.php
とエラーになりました。