Managing cron and similar E-Mails from headless systems
a24061 at ducksburg.com
Thu Feb 23 13:20:41 UTC 2017
On 2017-02-17, Chris Green wrote:
> I have several headless systems doing useful work around the place:-
> Most of these have one or more cron jobs running periodic rsync
> backups, copying data, etc. If the cron job has an error then it
> sends E-Mail to the owner of the job ('chris' in most cases, might be
> root in a couple).
> It's (moderately) easy to set up an MTA and /etc/aliases so that the
> messages are sent to my normal E-Mail. However I can't come up with a
> straightforward way of indicating where the messsage is *from*.
> Can anyone suggest a neat way of handling this so that I know where
> the errors are coming from?
The only way I've found to do this is to use Exim with the "rewrite"
stanza with "Eh" options to change all the locally generated addresses
to one suitable address. (I'm sure other full-size MTAs have the same
facility, but Exim is the only one I know.)
I looked into nullmailer, but AFAICT it doesn't have a way to
configure From addresses.
More information about the ubuntu-users