Bug 2370342 - dnf5-plugin-automatic email emitter creates invalid Date: headers with fractional seconds in the time.
Summary: dnf5-plugin-automatic email emitter creates invalid Date: headers with fracti...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: 41
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Petr Pisar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-04 21:06 UTC by Matthias Andree
Modified: 2025-07-31 02:04 UTC (History)
5 users (show)

Fixed In Version: dnf5-5.2.14.0-1.fc43 dnf5-5.2.15.0-2.fc42 dnf5-5.2.15.0-2.fc41
Clone Of:
Environment:
Last Closed: 2025-07-31 00:53:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Matthias Andree 2025-06-04 21:06:52 UTC
The email emitter of dnf5-plugin-automatic-5.2.13.1-1.fc41.x86_64 causes bogus Date: headers to be emitted. They are not in compliance and get rejected by some providers.

At least the large German Freemail/paid E-Mail service provider GMX.de rejects those when these are delivered to them, say, via e-mail alias of the sysadmin.

Example from a rejected message:

Date: Sat, 31 May 2025 10:28:45.162419022 +0000

Reproducible: Always

Steps to Reproduce:
1. set up dnf5-plugin-automatic-5.2.13.1-1.fc41.x86_64
2. configure it to emit reports via email
3. configure mail system to forward to a @gmx.de address
4. wait for, or provoke, a dnf automatic update that emits a report
Actual Results:
Date: header in emitted message is botched and adds fractions of a second, which is in violation of RFC5322's date-time headers, no matter if the current or the obs- prefixed syntax is referred to. Example:
Date: Sat, 31 May 2025 10:28:45.162419022 +0000


Expected Results:
The Date: header must be RFC-5322 compliant. It must not contain fractionals in the second.

Additional Information:
I am flagging this as "regression" because it didn't happen a few Fedora releases ago; but to be fair, I cannot prove the bug wasn't present at the time because I haven't archived such automated messages for long enough and I don't know if GMX.de tightened up their policies lately.

GMX.de's bounce message contains an URL that leads to a website explaining their policy rejection as this:

554 Nemesis ESMTP Service not available Transaction failed Reject due to policy restrictions.

Reason

Your e-mails have been rejected by our mail system because the information provided in the e-mail header does not comply with the specifications in RFC 5322.

The header field "Date" is syntactically not correct.

Solution

Please make sure that the requirement of RFC 5322 chapter 3.3 for the header field "Date" is fulfilled.

Example of syntactically correct notation:

Date: Sat, 1 Jan 2000 12:00:59 +0200

As soon as the corrections have been made by you, you can deliver emails to our system again.

Comment 1 Matthias Andree 2025-06-04 21:19:07 UTC
Workaround: use command_email as emitter instead. Note that you can't use email_to to expand several addresses, I've tried blank and comma and in both cases, s-nail (which is mail on my system) complained about a blank in the recipient address. What does work however is removing the {email_to} part from the command_format and putting the addresses there directly.

Comment 2 Petr Pisar 2025-06-05 07:52:28 UTC
I confirm this bug. It is in dnf5::EmailMessage::str() where a fmt::format("{%S}") formats time points with non-integral second resolution as a fractional number <https://fmt.dev/11.1/syntax/#chrono-format-specifications>.

Upstream developmental code dnf5-plugin-automatic-5.2.13.1-20250604011555.53.ge9fae8bd.fc43.x86_64 is also affected.

Comment 3 Petr Pisar 2025-06-05 15:00:52 UTC
A fix proposed upstream: https://github.com/rpm-software-management/dnf5/pull/2282

Comment 4 Petr Pisar 2025-06-09 11:44:32 UTC
Fixed accepted upstream.

Comment 5 Fedora Update System 2025-07-16 08:35:45 UTC
FEDORA-2025-a5e5885906 (dnf5-5.2.15.0-1.fc42 and librepo-1.20.0-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-a5e5885906

Comment 6 Fedora Update System 2025-07-16 08:36:20 UTC
FEDORA-2025-fb095dd283 (dnf5-5.2.15.0-1.fc41 and librepo-1.20.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-fb095dd283

Comment 7 Fedora Update System 2025-07-17 00:58:53 UTC
FEDORA-2025-a5e5885906 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-a5e5885906`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-a5e5885906

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2025-07-17 01:07:47 UTC
FEDORA-2025-fb095dd283 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-fb095dd283`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-fb095dd283

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2025-07-24 14:59:19 UTC
FEDORA-2025-9ae670b810 (dnf5-5.2.15.0-2.fc42 and librepo-1.20.0-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-9ae670b810

Comment 10 Fedora Update System 2025-07-24 15:00:24 UTC
FEDORA-2025-fdcda3af30 (dnf5-5.2.15.0-2.fc41 and librepo-1.20.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-fdcda3af30

Comment 11 Fedora Update System 2025-07-25 02:13:42 UTC
FEDORA-2025-9ae670b810 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-9ae670b810`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-9ae670b810

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2025-07-25 02:26:24 UTC
FEDORA-2025-fdcda3af30 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-fdcda3af30`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-fdcda3af30

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2025-07-31 00:53:18 UTC
FEDORA-2025-9ae670b810 (dnf5-5.2.15.0-2.fc42 and librepo-1.20.0-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2025-07-31 02:04:08 UTC
FEDORA-2025-fdcda3af30 (dnf5-5.2.15.0-2.fc41 and librepo-1.20.0-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.