我每天都会收到这封电子邮件:
From: Cron Daemon
Subject: Cron <root@server> /usr/share/spamassassin/sa-update.cron 2>&1 | tee -a /var/log/sa-update.log
UTF-16 surrogate 0xd800 at /usr/local/share/perl5/Pod/Simple/BlackBox.pm line 67.
UTF-16 surrogate 0xd800 at /usr/local/share/perl5/Pod/Simple/BlackBox.pm line 67.
UTF-16 surrogate 0xd800 at /usr/local/share/perl5/Pod/Simple/BlackBox.pm line 67.
我尝试编辑 crontab 来删除tee
命令并仅将其附加到日志文件,但是,我找不到 crontab。
# grep spam /etc/passwd
spam:x:510:511::/usr/local/spamassassin:/bin/false
# crontab -l -u spam
no crontab for spam
我还尝试列出root
crontab ( # crontab -l
),但它只有备份和 的条目certbot-auto
。我已经尝试更新 Perl (yum update perl
和cpanm Pod::Simple::BlackBox Mail::SpamAssassin
)。如何编辑 crontab 以避免收到此每日错误电子邮件?
CentOS 版本 6.10(最终版)
答案1
我发现并修复了它
# grep -r sa-update.cron /etc/*
/etc/cron.d/sa-update:#10 4 * * * root /usr/share/spamassassin/sa-update.cron 2>&1 | tee -a /var/log/sa-update.log
/etc/cron.d/sa-update:10 4 * * * root /usr/share/spamassassin/sa-update.cron 2>&1 >> /var/log/sa-update.log