PHPのメールコマンドが原因不明でfalseになり、メールが送信できないとの通報。
各種バージョンは以下の通り。
Ubuntu 22.04.1 LTS
PHP 5.6.40-62+ubuntu22.04.1+deb.sury.org+1 (cli)
Postfix 3.6.4
PHPのバージョンが…。それは置いておきまして調査。
# tail -f /var/log/mail.log
Sep 21 13:37:25 ssl postfix/sendmail[211941]: fatal: www-data(33): Recipient addresses must be specified on the command line or via the -t option
ググりましたところ、上記の指摘通り、sendmailコマンドに -t オプションを付ければ良いようです。
php.iniを編集します。
vi /etc/php/5.6/apache2/php.ini
sendmail_path = /usr/sbin/sendmail
これを以下に変更します。
sendmail_path = /usr/sbin/sendmail -t
こちらで無事送信が出来ました。
早急にシステム改修または再構築をお勧めしました。
参考
postfix/sendmail error unknown referring to command line
https://superuser.com/questions/1309907/postfix-sendmail-error-unknown-referring-to-command-line
2022-09-21 アクセス