0

Preface: I'm using Jessie Lite on a Raspberry Pi.

In crontab, the default text says

Output of the crontab jobs (including errors) is sent through email to the user the crontab file belongs to (unless redirected).

When I created this user, I didn't enter an email address (and don't recall being asked to enter one), so where and how can I enter one for this user?

The statement above implies to me that it is possible to use an email address associated with my user account somehow to send an email (instead of having to add a MAILTO environment variable with an email address to the crontab file).

Iceape
  • 103

2 Answers2

1

It refers to your local user account. Type mail (or mailx) for the command line client, or just cheat and use this to read the raw mail file

less "${MAIL:-/var/mail/$USER}"
Chris Davies
  • 116,213
  • 16
  • 160
  • 287
1

Output from cron jobs is not sent through internet email, but rather through local mail delivery. A local mail client such as mutt or the barebones mail will check the local mail spool (usually in /var/spool/mail/username) for any waiting messages.

DopeGhoti
  • 76,081
  • That was my confusion. I thought it would send it through the internet somehow. Jessie Lite didn't have any mail services installed out-of-the-box, so I installed Mutt and Postfix and now I see emails from cron in /var/mail/. Thanks for the help! – Iceape Oct 22 '18 at 12:06