I know how to send package update email notification under Debian / Ubuntu Linux. How do I send Automatic Email Notification under RHEL v4/5, CentOS, Red Hat and Fedora Linux, when security & package updates available? How do I force yum to send an email when upgrades available?
RHEL / Fedora / CentOS has yum-updatesd, which provides notification of updates which are available to be applied to your system. This notification can be done either
via syslog, email or over dbus. Configuration is done via the /etc/yum/yum-updatesd.conf file.
Open /etc/yum/yum-updatesd.conf file, enter:
# vi /etc/yum/yum-updatesd.conf
Setup variables as follows:
emit_via = email
# who to send the email to:
email_to = firstname.lastname@example.org
# who send the notifications
email_from = email@example.com
Here is complete working config file:
[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 = email # who to send the email email_to = firstname.lastname@example.org # who send the notifications email_from = email@example.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
Save and close the file. Restart notification yum-updatesd service:
# /etc/init.d/yum-updatesd restart
Sample email sent by yum notification
Hi, This is the automatic update system on node02.nixcraft.co.in. There are 2 package updates available. Please run the system updater. Packages available for update: device-mapper-multipath kpartx Thank You, Your ComputerTweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?