Cron Mail
Cron Mail
[Cueball is sitting at a table in an office chair working on his laptop. Ponytail walks up to him.] Cueball: I've been getting these "You have new mail" UNIX notifications for like 15 years, but I've never bothered to figure out what it's talking about.
[Ponytail has stopped behind Cueball who is typing on his laptop. When Ponytail (and later Cueball) mentions code, the text uses both small and capital letters (as opposed to only capital letters in all other text).] Ponytail: Look in /var/mail? Cueball: OK... Cueball: Oh, wow, there's like a gigabyte of stuff from Cron in here.
[In a frame-less panel Ponytail is facepalming. Cueball is replying from off-panel with a starburst indicating his position.] Ponytail: *Sigh* Ponytail: You should fix your Cron, then point "MAILTO=" somewhere you actually see- Cueball (off-panel): Better idea:
[Same setting as panel 2 but Cueball is visibly typing on the laptop as shown with three small curved lines over his hands on the keyboard.] Cueball: export MAILTO=/etc/crontab Cueball: There. Your move, Cron. Ponytail: Wow. Hardball. Cueball: Let's see how important it thinks that mail really is.

On Unix -like systems, cron is a system utility that runs tasks on a schedule.  This program has been around since the early days of Unix and has not changed much - it is still one of the most widely used functions in modern operating systems.  Many administrative tasks on servers are automated using cron, including monitoring and updates.
When a cron job produces output, cron's default behavior is to send an email to the user account under which the job ran.  However, in most situations, an email address has not been set up for that user, so the email is instead written to a mailbox file.  Most Unix shells will notify the user with a message like "You have new mail" when this mailbox file is updated, but if the user doesn't know how to check this mail file, they will likely just ignore the message.
In this case, Cueball has been ignoring his mailbox for fifteen years.  When he finally learns where to look, he discovers more than a gigabyte worth of messages from the cron program, the vast majority of which are likely meaningless.  Ponytail says to Cueball "fix your cron" (likely meaning he should fix the task that's generating the output so that it doesn't do so), then set a parameter that tells cron to send email to an address he actually checks.  (He could also opt to direct the mails to /dev/null , which would discard them, or simply disable the mail in the crontab.)  Cueball, however, interprets the tremendous amount of email as spam and decides to redirect the emails to /etc/crontab , the main configuration file that contains all of cron's scheduling information.  He apparently believes that this will either stop the emails or cause cron to spam itself instead.
In reality, this will not cause significant problems as the MAILTO environmental variable in cron takes an email address or usernames on the local system and attempts to send emails to them.  It will not write or append output to a local file like /etc/crontab .  Thus when cron attempts to email /etc/crontab the mail program cron uses will generate an error saying it can't find the user /etc/crontab .
For example, if you create the following crontab:
installed on a user named me on a system called mycomputer then you will see a new error messages email to you (located in /var/mail/me ) stating it can't send email to a user named /etc/crontab and the undelivered email is being returned to the sender.  The error email will look like the following:
The title text shows that Cueball is somewhat aware of what cron does, including the fact that it's existed pretty much unchanged for several decades, but he hasn't bothered to really get into understanding it, treating it more as a foe to vanquish rather than as a tool to understand and use.
[Cueball is sitting at a table in an office chair working on his laptop. Ponytail walks up to him.] Cueball: I've been getting these "You have new mail" UNIX notifications for like 15 years, but I've never bothered to figure out what it's talking about.
[Ponytail has stopped behind Cueball who is typing on his laptop. When Ponytail (and later Cueball) mentions code, the text uses both small and capital letters (as opposed to only capital letters in all other text).] Ponytail: Look in /var/mail? Cueball: OK... Cueball: Oh, wow, there's like a gigabyte of stuff from Cron in here.
[In a frame-less panel Ponytail is facepalming. Cueball is replying from off-panel with a starburst indicating his position.] Ponytail: *Sigh* Ponytail: You should fix your Cron, then point "MAILTO=" somewhere you actually see- Cueball (off-panel): Better idea:
[Same setting as panel 2 but Cueball is visibly typing on the laptop as shown with three small curved lines over his hands on the keyboard.] Cueball: export MAILTO=/etc/crontab Cueball: There. Your move, Cron. Ponytail: Wow. Hardball. Cueball: Let's see how important it thinks that mail really is.
