Linux 现在正在向我发送垃圾邮件(anacron)

Linux 现在正在向我发送垃圾邮件(anacron)

大约一年前以来,linux Debian 一直向我发送垃圾邮件,如下所示:

Subject: Anacron job 'cron.daily' on mymachine
Content-Type: text/plain; charset=UTF-8
Date: Mon,  3 Apr 2017 07:35:04 -0400 (EDT)

/etc/cron.daily/logrotate:
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file apt
reading config file aptitude
reading config file consolekit
reading config file dpkg
reading config file exim4-base
reading config file exim4-paniclog
reading config file firebird2.5
reading config file iptraf
reading config file mumble-server
reading config file pm-utils
reading config file ppp
reading config file rsyslog
reading config file samba
reading config file speech-dispatcher
reading config file unattended-upgrades
reading config file winbind

Handling 23 logs

rotating pattern: /var/log/apt/term.log  monthly (12 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apt/term.log
  log does not need rotating

rotating pattern: /var/log/apt/history.log  monthly (12 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apt/history.log
  log does not need rotating

rotating pattern: /var/log/aptitude  monthly (6 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/aptitude
  log does not need rotating

rotating pattern: /var/log/ConsoleKit/history  monthly (6 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/ConsoleKit/history
  log does not need rotating

rotating pattern: /var/log/dpkg.log  monthly (12 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/dpkg.log
  log does not need rotating

rotating pattern: /var/log/alternatives.log  monthly (12 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/alternatives.log

(1) 有没有办法通过单一设置来阻止这种情况,或者我是否需要单独找到每种垃圾邮件类型的动机并单独解决?

(2)如果我需要解决这个问题,一次一封垃圾邮件,我该如何处理上面粘贴的anacron问题?

(3)为什么现在会出现这种情况?我的 Debian 机器已经使用了至少 6 年,大约一年左右我才开始收到垃圾邮件,现在我的邮箱中有 577 封此类邮件。

答案1

如果您以 root 身份登录并运行

/usr/sbin/logrotate -v /etc/logrotate.conf

您将在屏幕上看到该输出。问题是-v你必须删除它。你会-v在这里找到:

$ grep -r logrotate /etc/cron*

输出示例:

/etc/cron.daily/logrotate:test -x /usr/sbin/logrotate || exit 0
/etc/cron.daily/logrotate:/usr/sbin/logrotate -v /etc/logrotate.conf

cron获得一些输出时,默认情况下它会被邮寄给 user root

相关内容