Fedora Account System
Red Hat Associate
Red Hat Customer
dnf-automatic can be configured to send email, but fails on delivery to sendmail with the message "libcurl error while sending e-mail: Weird server reply" and reviewing the SMTP server logs it reports "info=Bare linefeed (LF) not allowed, where=body, status=tempfail" Reproducible: Always Steps to Reproduce: 1.Install and configure dnf-automatic package 2.Configure with "emit_via = email" and set up "[email]" variables 3.With for updates and review logs Actual Results: No email is delivered and the messages listed above are generated. Expected Results: Email should be delivered. Note, emitter "command_email" should work in place if an email program is installed.
I cannot reproduce it with a default postfix configuration. We need more details: A content of your /etc/dnf/automatic.conf, what SMTP server you use, what text is dnf-automatic is trying to send (preferably provide a network dump, or at least output of dnf-automatic if confifgured with emit_via=stdio).
And please tell us your dnf5-plugin-automatic and libcurl versions.
The versions are: libcurl-8.9.1-2.fc41.x86_64 dnf5-plugin-automatic-5.2.8.1-2.fc41.x86_64 and the mail server is sendmail (sendmail-8.18.1-1.fc40.x86_64) /etc/dnf/automatic.conf was (now using command_email): [commands] apply_updates = yes reboot = when-needed [emitters] emit_via = email,motd [email] email_from = root.id.au email_host = smtp.crawford.emu.id.au And sorry, I can't say what it was trying to send, as it is both a week ago, and that has been replaced by more recent update.
The error message is a news in sendmail 8.18.1: - Accept only CRLF . CRLF as end of an SMTP message as required by the RFCs, which can disabled by the new srv_features option 'O'. - Do not accept a CR or LF except in the combination CRLF (as required by the RFCs). These checks can be disabled by the new srv_features options 'U' and 'G', respectively. In this case it is suggested to use 'u2' and 'g2' instead so the server replaces offending bare CR or bare LF with a space. It is recommended to only turn these protections off for trusted networks due to the potential for abuse. So either there is a bug either in dnf5 or curl.
I dumped an arbitrary e-mail sent by dnf-automatic and I confirm it only separates lines in the body with "\n". Which is probably what sendmail complains now. It seems that curl library does no escaping when reading the e-mail body from an application.
I can reproduce it in Fedora 42 with a developmental DNF5 when an update is available and DNF5 wants to dowload it: sendmail-8.18.1-4.fc41.x86_64 libcurl-8.11.1-2.fc42.x86_64 dnf5-plugin-automatic-5.2.8.1-20250108010401.26.g47070ab7.fc42.x86_64
I don't know what you would set in libcurl, but I see that for curl there is a specific option --crlf to convert line feeds to carriage return plus line feed in upload.
Thanks for the hint. Indeed curl library has an option for converting the end-of-lines/ I also checked how curl handles a standalone dot in the message body and that one is escaped correctly. I will write a patch for DNF5 to use that option. I will also open a question for curl whether it is a bug.
Fix merged upstream.
FEDORA-2025-f3bc917e71 (dnf5-5.2.8.1-3.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2025-f3bc917e71
FEDORA-2025-f3bc917e71 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-f3bc917e71` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-f3bc917e71 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-f3bc917e71 (dnf5-5.2.8.1-3.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.
Unfortunately the problem looks to still exist. I've installed dnf5-plugin-automatic-5.2.8.1-3.fc41.x86_64 and it still fails to send emails during the update, with the same complaint on the sendmail server.
I bet successfully tested before building it package. But now it indeed fails. But the failure is different: sendmail[9078]: 50EC3pMO009078: collect: relay=localhost, from=<root@localhost>, info=Bare carriage return (CR) not allowed, where=header, status=tempfail The previous issue was about CR in e-mail body. Now it complains about e-mail headers.
It works in Fedora 42 with: dnf5-5.2.8.1-4.fc42.x86_64 libcurl-8.11.1-2.fc42.x86_64 sendmail-8.18.1-5.fc42.x86_64 but fails in Fedora 41 with: dnf5-5.2.8.1-3.fc41.x86_64 libcurl-8.9.1-3.fc41.x86_64 sendmail-8.18.1-4.fc41.x86_64 sendmail and dnf5 packages have identical sources. Probably something with curl.
Network dump confirms that in Fedora 41 e-mail header lines are wrongly ended with "\r\r\n" and e-mail body correctly with "\r\n". While in Fedora 42 both are fine.
A fix for the header lines was now accepted upstream. It will be delivered in dnf5-5.2.9.0 soon.
FEDORA-2025-665751b0e4 (dnf5-5.2.10.0-2.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2025-665751b0e4
FEDORA-2025-665751b0e4 (dnf5-5.2.10.0-2.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.