How to Configure yum-updatesd to Notify By Email

On most new CentOS server installs yum-updatesd is installed by default and by default it sends notifications to the dbus. You do however have the option to configure it to send updates via email or to syslog. If you do decide to have updates sent via email then you will need to add a couple more configuration options to /etc/yum/yum-updatesd.conf which are email_to and email_from. Listed at the bottom of this post is the default configuration file followed by a yum-updatesd.conf file that will send email notifications of new files.

Another thing to watch out for is yum-updatesd locking your ability to update files via yum. While it is checking to see if there are new packages available it puts a lock on using yum so if you run into this problem you either want to remove yum-updatesd or set its configuration to not check once every hour. I changes my default to 10800 seconds or 3 hours.


The default configuration file for yum-updatesd

[quickcode:yum-updatesd.conf]
[main]
# 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
[/quickcode]

A modified yum-updatesd.conf file that adds in email options and changes the default checking time from 3600 seconds to 10800 seconds.

[quickcode:yum-updatesd.conf]
[main]
# how often to check for new updates (in seconds)
run_interval = 10800
# how often to allow checking on request (in seconds)
updaterefresh = 600

# how to send notifications (valid: dbus, email, syslog)
emit_via = email
# should we listen via dbus to give out update information/check for
# new updates
dbus_listener = no

# who to send the email notifications to
email_to = server-admin@example.com

# who send the notifications
email_from = root@serv1.example.com

# automatically install updates
do_update = no
# automatically download updates
do_download = no
# automatically download deps of updates
do_download_deps = no
[/quickcode]

Share