Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3560

General Questions • [Software] Unattended-upgrades keeps sending emails to the wrong address?

$
0
0
My unattended-upgrade installation keeps sending emails to root@myhost even though I have set dedicated root email address in /etc/email-addresses.

My question is - where is unattended-upgrades getting the address "root@myhost" from? And how to force Unattended-upgrades to use the address in /etc/email-addresses?

If I enter my full email address in /etc/apt/apt.conf.d/50unattended-upgrades everything works, but I would rather like to have the email address specified in one place on my system.

Furthermore, I have no trouble sending test mails from the terminal. (e.g. echo "Some text" | mail -s "Root message" myemai@mydomain.com.

When testing Unattended-upgrades mail reports I get an error message because the mail is send to root@myhost, which of cause is not a valid email address.

I'm running:
  • Debian 12.6
    Exim version 4.96 (as Smarthost, no local mail. Gmail SMTP)

Code:

DNS Error: DNS type 'mx' lookup of myhost responded with code NXDOMAIN Domain name not found: myhost For more information, go to https://support.google.com/mail/?p=BadRcptDomainReporting-MTA: dns; googlemail.comReceived-From-MTA: dns; .....@gmail.comArrival-Date: Fri, 05 Jul 2024 01:57:13 -0700 (PDT)X-Original-Message-ID: <E1sPekj-0000JB-18@myhost.mydomain.com>Final-Recipient: rfc822; root@myhostAction: failedStatus: 5.1.2Diagnostic-Code: smtp; DNS Error: DNS type 'mx' lookup of myhost responded with code NXDOMAINDomain name not found: myhost For more information, go to https://support.google.com/mail/?p=BadRcptDomainLast-Attempt-Date: Fri, 05 Jul 2024 01:57:15 -0700 (PDT)

Code:

root@myhost:~# cat /etc/aliases# /etc/aliasesmailer-daemon: postmasterpostmaster: rootnobody: roothostmaster: rootusenet: rootnews: rootwebmaster: rootwww: rootftp: rootabuse: rootnoc: rootsecurity: rootroot: myuser

Code:

root@myhost:~# cat /etc/email-addresses # This is /etc/email-addresses. It is part of the exim package## This file contains email addresses to use for outgoing mail. Any local# part not in here will be qualified by the system domain as normal.## It should contain lines of the form:##user: someone@isp.com#otheruser: someoneelse@anotherisp.commyuser: my-email@mydomain.com

Code:

root@myhost:~# cat /etc/apt/apt.conf.d/50unattended-upgrades ...// Send email to this address for problems or packages upgrades// If empty or unset then no email is sent, make sure that you// have a working mail setup on your system. A package that provides// 'mailx' must be installed. E.g. "user@example.com"Unattended-Upgrade::Mail "root";// Set this value to one of://    "always", "only-on-error" or "on-change"// If this is not set, then any legacy MailOnlyOnError (boolean) value// is used to chose between "only-on-error" and "on-change"Unattended-Upgrade::MailReport "on-change";

Statistics: Posted by runvvv — 2024-07-05 12:50 — Replies 0 — Views 16



Viewing all articles
Browse latest Browse all 3560

Trending Articles