# Dnf-automatic syntax vs. email notifications

**URL:** <https://forums.rockylinux.org/t/dnf-automatic-syntax-vs-email-notifications/4230>\
**Category:** Rocky Linux Help & Support\
**Created:** [October 6, 2021, 8:19am UTC](https://forums.rockylinux.org/t/dnf-automatic-syntax-vs-email-notifications/4230 "2021-10-06T08:19:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![microlinux](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/microlinux/32/1244_2.png) [@microlinux](https://forums.rockylinux.org/u/microlinux)\
**Post date:** [October 6, 2021, 8:19am UTC](https://forums.rockylinux.org/t/dnf-automatic-syntax-vs-email-notifications/4230/1 "2021-10-06T08:19:42Z")

</div>

Hi,

I’m currently moving my servers running CentOS 7 and Oracle Linux 7 to Rocky Linux 8. Up until now, I’ve been handling automatic updates using `yum-cron` with email notifications. This has been working perfectly for years.

Now I’m getting a grip on `dnf-automatic`, which works similarly to `yum-cron`. After installing the `dnf-automatic` package, I have an `/etc/dnf/automatic.conf` configuration file with annotations, and it’s more or less self-explanatory. On a side note, I noticed that contrary to CentOS, Rocky Linux does provide security meta-information about packages, so I get to choose between `default` updates or only those flagged as `security` updates, which is nice.

In the provided `automatic.conf` configuration file sample, there’s a redundancy that’s a bit puzzling. First, there’s a section `[email]` with the following default directives:

```auto
[email]
# The address to send email messages from.
email_from = root@example.com

# List of addresses to send messages to.
email_to = root

# Name of the host to connect to to send email messages.
email_host = localhost

```

But then below this, there’s another section named `[command_email]` with some sort of overlapping redundancy:

```auto
[command_email]
...

# The address to send email messages from.
email_from = root@example.com

# List of addresses to send messages to.
email_to = root

```

I admit I’m a bit puzzled. Do I have to keep both sections?

Cheers,

Niki

---

<div class="post-metadata">

**Author:** ![sweh](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/sweh/32/1287_2.png) [@sweh](https://forums.rockylinux.org/u/sweh)\
**Post date:** [October 6, 2021, 12:39pm UTC](https://forums.rockylinux.org/t/dnf-automatic-syntax-vs-email-notifications/4230/2 "2021-10-06T12:39:14Z")

</div>

In the `[emitters]` sections you can tell it what subsystem to use for reporting.

If you use `email` (the default, I think) then the `[email]` section is used for configuration. In this the code makes an SMTP call to a server, so you need to tell it the SMTP server to call.

If you use `command_email` then the `[command_email]` section is used. In this it runs a command locally (defaults to `mail -Ssendwait -s {subject} -r {email_from} {email_to}`) so your local sendmail/postfix/whatever configuration is used.

More details are available here: [DNF Automatic — dnf latest documentation](https://dnf.readthedocs.io/en/latest/automatic.html)

---

<div class="post-metadata">

**Author:** ![microlinux](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/microlinux/32/1244_2.png) [@microlinux](https://forums.rockylinux.org/u/microlinux)\
**Post date:** [October 6, 2021, 4:22pm UTC](https://forums.rockylinux.org/t/dnf-automatic-syntax-vs-email-notifications/4230/3 "2021-10-06T16:22:09Z")

</div>

Thanks very much for your detailed explanation. Now everything’s clear.

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 4:04am UTC](https://forums.rockylinux.org/t/dnf-automatic-syntax-vs-email-notifications/4230/4 "2023-08-25T04:04:26Z")

</div>


