Skip to content

Commit 0943c4b

Browse files
committed
[Fix] Explicitly disable cron reports
Currently missing MAILTO variable defaults user@hostname and floods the email server in case of errors, reaching exim ratelimits ref: https://manpages.ubuntu.com/manpages/bionic/man5/crontab.5.html
1 parent cb0f85d commit 0943c4b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

func/main.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,8 @@ sync_cron_jobs() {
622622
if [ "$CRON_REPORTS" = 'yes' ]; then
623623
echo "MAILTO=$CONTACT" > $crontab
624624
echo 'CONTENT_TYPE="text/plain; charset=utf-8"' >> $crontab
625+
else
626+
echo 'MAILTO=""' > $crontab
625627
fi
626628

627629
while read line; do

0 commit comments

Comments
 (0)