Setting a global MAILTO environment variable in Cron
Posted on Wed 27 April 2022 in Sysadmin
On Debian/Ubuntu sysetems you can set MAILTO in /etc/environment
(nor in /etc/default/cron
, nor in systemd unit files with DefaultEnvironment
) and have it apply to all
of your crontabs. MAILTO(among other Cron "environment" variables) must be set within the crontab itself. This dissapoints.
If there is solution to this problem, please post it here.