:: Re: [DNG] Configuring cron and exim…
Top Page
Delete this message
Reply to this message
Author: Marc Shapiro
To: dng
New-Topics: [DNG] (SOLVED _ I hope) Configuring cron and exim4 to send e-mail after running cronjob
Subject: Re: [DNG] Configuring cron and exim4 to send e-mail after running cronjob
On 11/15/20 5:00 AM, Marjorie Roome via Dng wrote:
> On Sat, 2020-11-14 at 16:03 -0800, Marc Shapiro via Dng wrote:
>> I use Thunderbird for e-mail, so I have never bothered with
>> configuring an MTA.
>> I have a few lines in root's crontab to do periodic backups and I
>> would
>> like to receive an e-mail when the job is completed. I have added a
>> MAILTO line to my crontab with my gmail address. The job runs, the
>> backup is created, but I do not receive any e-mail from cron. I am
>> assuming that I need to run dpkg-reconfigure on exim4-config, but I
>> don't want to mess up my e-mail that is going through Thunderbird.
>> Can anyone tell me how to configure exim4-config to do this, or
>> provide a link that will rpovide this information?
> If this is a cron job running on your local machine then rather than
> having to fully comnfigure your MTA to send acceptable emails to gmail
> (i.e. static ip, spf, dkim, etcetera) it would be simpler to enable
> local delivery to your local email account. You can then just read this
> by setting up an account in Thunderbird (it's a mbox file so use the
> spool option) and it will remain segregated from your gmail.

I came to this conclusion, too, but, so far, have been unable to get
local delivery working, either.  I have tried running 'maIl marc' then
filled in subject and body, then ended with CTL-D.  Is CTL-D the correct
way to end the message and send the e-mail?  Is there something else
that I need to do to actually send the message?   It may be that the
various things that I have tried have borked local delivery.  What
should I have installed and how should it be configured to deliver mail
to my local user?

Clearly, I am doing something wrong, I just don't know what.


> Rather than redirect the cron mail output I just let root user jobs go
> to the default root account and alias that to my local email account
> (using /etc/aliases and the newalliases command).
> This will then also pick up any other root jobs that generate emails
> (in my case unattended-upgrades of security updates, and failed
> logins).