update-apacheblocker.sh improperly uses -t option with sendmail, which seems to have inconsistent behavior between implementations. Using -t with exim causes message delivery failure with the following message:
A message that you sent using the -t command line option contained no
addresses that were not also on the command line, and were therefore
suppressed. This left no recipient addresses, and so no delivery could
be attempted.
Exim's -t documentation
-tWhen Exim is receiving a locally-generated, non-SMTP message on its standard input, the -t option causes the recipients of the message to be obtained from the To:, Cc:, and Bcc: header lines in the message instead of from the command arguments.
To Reproduce
This is performed on a cPanel server.
$ echo -e "Subject: test" | sendmail -t test@example.com`
2021-12-10 08:30:04 1mvfyO-0005st-Qd 1mvfyO-0005st-Qd no recipients found in headers`
$ echo $?
1
When using a program like Cronic which safely quiets down cron emails from update-apacheblocker.sh, the exit status of 1 due to the improper use of sendmail -t option produces an email alert almost everyday due to the frequent updates to apache-ultimate-bad-bot-blocker.
Bug Description
update-apacheblocker.sh
improperly uses-t
option with sendmail, which seems to have inconsistent behavior between implementations. Using-t
with exim causes message delivery failure with the following message:Exim's
-t
documentation-t
When Exim is receiving a locally-generated, non-SMTP message on its standard input, the -t option causes the recipients of the message to be obtained from the To:, Cc:, and Bcc: header lines in the message instead of from the command arguments.
To Reproduce
This is performed on a cPanel server.
When using a program like Cronic which safely quiets down cron emails from
update-apacheblocker.sh
, the exit status of1
due to the improper use of sendmail-t
option produces an email alert almost everyday due to the frequent updates to apache-ultimate-bad-bot-blocker.Expected Behaviour
Screenshots
Server: