Feedback

type to search

How do I get apt-get email the root account of a server for security updates?

Asked by [ Editor ] , Edited by Fernando C. Estrada [ Admin ]

I used to be maintaining an Ubuntu server system, where I regularly logged into. This frequency has gone down significantly, and therefore, I no longer get messages about security updates anymore. I am personally moving back to Debian systems, and after my laptop will install Squeeze on other systems at home which I maintain. However, as I am not regularly logging in on those either, I was wondering if it is possible to have apt-get send the admin account an email when new security updates are available, much like it gives messages to the desktop and upon login with SSH?

or Cancel

2 answers

6

zack [ Admin ]

Have a look at the cron-apt package, it can be configured to do various actions, including simple mailing, when new package updates become available.

Another related solution is unattended-upgrades , which I personally prefer in those cases where I do want automatic upgrades, whereas for mail only I prefer cron-apt. In the end, it’s a matter of personal preferences though.
NN comments
chem-bla-ics
-

Cool! I’ll need to look into in how to get it to email only when there are security updates, but that might be as much as checking it’s output with a regular expression, and then conditionally email :) Thanx!

zack
-
-bla-ics you don’t need any of that, both tools already support mailing only on action and not mailing when nothing happens

r murphy
-

I only use apticron, so I cannot answer the first question, but the second question can easily be solved by installing a simple “daemon” like ssmtp which can be configured to forward all mails to a single machine. Does this help?

or Cancel

Your answer

You need to join Debian to complete this action, click here to do so.