To send package update notifications via email on a Red Hat/CentOS/Fedora system, you can use the yum-cron
package, which is part of the yum-utils
package.
Here’s how to set up yum-cron
to send email notifications:
- Install the
yum-cron
package:
sudo yum install yum-cron
- Open the
/etc/yum/yum-cron.conf
file for editing:
sudo vi /etc/yum/yum-cron.conf
- Change the following parameters in the configuration file:
update_messages = yes
email_from = root .com
email_to = user .com
Set update_messages
to “yes” to enable update notifications. Replace root@example.com
with the email address that the notification will be sent from, and replace user@example.com
with the email address that the notification will be sent to.
- Save and exit the file.
- Start the
yum-cron
service:
sudo systemctl start yum-cron
Now, when updates are available for installation, yum-cron
will send an email notification to the configured email address.