How to get yum package update notifications via e-mail?
This will work for: Red Hat / CentOS / Fedora
For Debian / Ubuntu: Please visit this website.
My server sends me a notifications for everything what happens on the server through e-mail, the only thing I had to check manually every time were the updates / upgrades for my Linux system. I figured there should be a way to get yum-update send notifications with available upgrades. So what we are going to do now is force yum to send an email when a update or upgrade is available.
First thing we need to do is open the yum config file.
# how often to check for new updates (in seconds)
run_interval = 3600
# how often to allow checking on request (in seconds)
updaterefresh = 600
# how to send notifications (valid: dbus, email, syslog)
emit_via = dbus
# should we listen via dbus to give out update information/check for
# new updates
dbus_listener = yes
# automatically install updates
do_update = no
# automatically download updates
do_download = no
# automatically download deps of updates
do_download_deps = no
Add these variables, and change “email_to” to your e-mail address:
# who to send the email to:
email_to = email@example.com
# who send the notifications
email_from = yum-update@yourserver.com
Here is my working config file. You can also just copy and use this one and change the e-mail addresses.
# how often to check for new updates (in seconds)
run_interval = 3600
# how often to allow checking on request (in seconds)
updaterefresh = 600
# how to send notifications (valid: dbus, email, syslog)
emit_via = email
# who to send the email to:
email_to = email@example.com
# who send the notifications
email_from = yum-update@yourserver.com
# should we listen via dbus to give out update information/check for
# new updates
dbus_listener = yes
# automatically install updates
do_update = no
# automatically download updates
do_download = no
# automatically download deps of updates
do_download_deps = no
After saving the file. Restart notification yum-updatesd service.
E-mail notification sample sent by yum notification.
From: yum-update@example.com
Date: 12/4/2009 11:34:31
To: email@example.com
Hi,
This is the automatic update system on yourserver.com
There are 9 package updates available. Please run the system updater.
Packages available for update:
firefox
kernel
cscope
kernel-headers
dnsmasq
kernel-devel
apr-util
xulrunner
apr-util-devel
Thank You,
Your Computer

Comments
Good to know that such feature exists! Thanks.
Joshua
Thanks for you comment Joshua, did you also know that you can have your root mail send to another e-mail address as well? That way you’ll be able to receive all the logs, errors & warnings from your server or linux computer in your inbox.
Bob