Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic: Fix end-of-lines in messages sent by email emitter #1992

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

ppisar
Copy link
Contributor

@ppisar ppisar commented Jan 8, 2025

Sendmail 8.18.1 started to reject e-mail messages without CRLF line endings:

# dnf-automatic
libcurl error while sending e-mail: Weird server reply

# journalctl -f
sendmail[7095]: 508DXZbS007095: collect: relay=localhost, from=<root@localhost>, info=Bare linefeed (LF) not allowed, where=body, status=tempfail

This is a deliberate change in Sendmail 8.18.1. And the cause is that automatic plugin composes a message body with UNIX line endings and passes it to cURL library with CURLOPT_READDATA option.

While cURL automatically escapes leading dots in the body (".\r\n"), it does not normalize end-of-lines
curl/curl#15942.

This patch fixes it by asking cURL to perform the normalization.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2335508

Sendmail 8.18.1 started to reject e-mail messages without CRLF line
endings:

    # dnf-automatic
    libcurl error while sending e-mail: Weird server reply

    # journalctl -f
    sendmail[7095]: 508DXZbS007095: collect: relay=localhost, from=<root@localhost>, info=Bare linefeed (LF) not allowed, where=body, status=tempfail

This is a deliberate change in Sendmail 8.18.1. And the cause is that
automatic plugin composes a message body with UNIX line endings and
passes it to cURL library with CURLOPT_READDATA option.

While cURL automatically escapes leading dots in the body (".\r\n"),
it does not normalize end-of-lines
<curl/curl#15942>.

This patch fixes it by asking cURL to perform the normalization.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2335508
Copy link
Member

@m-blaha m-blaha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@m-blaha m-blaha added this pull request to the merge queue Jan 9, 2025
Merged via the queue into rpm-software-management:main with commit 9a5cba8 Jan 9, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants