Konstantin Tutsch

How to configure automatic updates on Fedora with e-mail reports

Dec 5th, 2023

How to use DNF Automatic and Postfix for automatically updating your Fedora server and sending reports via e-mail about the update.


You first need to install dnf-automatic, postfix and mailx:

dnf install -y dnf-automatic postfix mailx

After all programms have been installed, you can start configuring the e-mail server.

E-Mail Server

Postfix’s configuration is located at /etc/postfix/main.cf. These are the values that should be set:

I have configured Postfix like this:

myhostname = notmalware.info
mydomain = notmalware.info

mynetworks_style = host

To test your Postfix configuration, you can execute this command:

echo "Hi, I'm your e-mail's body!" | mailx -r "test@server" -s "A test e-mail from Postfix!" "you@example.com"

Now that your e-mail server is working fine, you can configure DNF Automatic! 🤩

DNF Automatic

Automatic is a component of DNF. It’s configuration file is located at /etc/dnf/automatic.conf.

Here are all the necessary configuration parameters:




This is my configuration:

# Check for updates daily
random_sleep = 86400

download_updates = yes
apply_updates = yes
reboot = when-needed

emit_via = command_email

command_format = "mailx -s {subject} -r {email_from} {email_to}"

email_from = dnf@notmalware.info
email_to = me@example.com

Finally, you need to enable one of DNF Automatic’s systemd timers.


If you have set e. g. download_updates to yes in your configuration, the timers settings will be overritten by the parameter(s).

You can choose between these three timers:

I chose the installer timer:

systemctl enable --now dnf-automatic-install.timer


Next time there are updates due, you will receive an e-mail telling you to not worry about it! 🥳

If you want to have a closer look at DNF Automatic, check out it’s documentation.

Tagged with: Self-hosting

Reply to this post

If you have any thoughts about the contents of this post, email me so we can have a fun little chat about it 🤯

Want to not miss a post?

That's easy! I provide a RSS feed so you can stay up to date with my blog and what I'm doing ⏳

Subscribe via RSS

Found a mistake?

That's bad! But you can help me correct my error. All posts are available on GitHub. Just open a pull request with your fix. I'll merge it! 👌