0

Since about a year ago, linux Debian has been spamming me with messages like the following:

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) Is there a way I can stop this with a single setting or do I need to individually find the motivation for each spam type and address it separately?

(2) If I need to solve this problem, one spam at a time, how do I deal with the anacron issue pasted above?

(3) Why is this happening now? I have had my Debian machine for at least 6 years and it is only since about a year or so that I started getting spammed and right now I have 577 messages in my mailbox of this type.

3
  • I think you changed some flags in logrotate, to print debug information. Commented Dec 20, 2017 at 15:54
  • ... what happened a year ago? are the configurations kept under version control?
    – thrig
    Commented Dec 20, 2017 at 16:01
  • You should be able to set a null MAILTO in the /etc/cron.daily/logrotate file. MAILTO= Commented Dec 20, 2017 at 17:11

1 Answer 1

3

If you login as root and run

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

you will get that output on the screen. The problem is the -v which you have to remove. You will find the -v here:

$ grep -r logrotate /etc/cron*

Example output:

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

When cron get some output it would by default be mailed to user root.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .