It will send an email if you uncomment this line and set it to "always". You dont have to use these sed commands, you can just edit the file. I'm just sharing them because I use several VMs:
sed -i 's,//Unattended-Upgrade::MailReport "on-change";,Unattended-Upgrade::MailReport "always";,' /etc/apt/apt.conf.d/50unattended-upgrades
Then set it only on error:
sed -i 's,Unattended-Upgrade::MailReport "always";,Unattended-Upgrade::MailReport "only-on-error";,' /etc/apt/apt.conf.d/50unattended-upgrades
Or to set it first to only on error:
sed -i 's,//Unattended-Upgrade::MailReport "on-change";,Unattended-Upgrade::MailReport "only-on-error";,' /etc/apt/apt.conf.d/50unattended-upgrades
Then run it manually with unattended-upgrades
and it will send a "SUCCESS" email even if there are no updates to upgrade.
/etc/apt/apt.conf.d/50unattended-upgrades
file? Specifically the line referring toUnattended-Upgrade::Mail
. Additionally what are you using to send the email? Is your smtp client/server setup properly? Thank you.Unattended-Upgrade::Mail "[email protected]";
. I'm using exim4 and it's working fine - I can send emails from the shell as myself or root usingmail
ormailx
.