1

I defined unattended-upgrade configuration in /etc/apt/apt.conf.d/50unattended-upgrades file. It works fine, I receive an email notification when an upgrade is applied.

The notificatoin email shows this subject: unattended-upgrades result for debian.example.com: SUCCESS.

Where does that debian.example.com comes from? I could not find it in the configuration file. How could I add my VPS name instead? (I am using Exim4, and /etc/email-addresses is empty, is this related?)

Thanks a lot!

1 Answer 1

1

The email subject is constructed as follows:

    subject = _(
        "{hold_flag}{reboot_flag} unattended-upgrades result for "
        "{machine}: {result}").format(
            hold_flag=hold_flag_str, reboot_flag=reboot_flag_str,
            machine=host(), result="SUCCESS" if res else "FAILURE").strip()

The machine name is the result of host(), which is defined as

def host():
    # type: () -> str
    return socket.getfqdn()

So debian.example.com is your FQDN, which you can see by running

hostname --fqdn

This is usually stored in /etc/hostname; changes to that should show up in the unattended-upgrade emails.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .