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

nullmailer sends non-RFC compliant messages (lines longer than 998 characters) #92

Open
mricon opened this issue Jan 9, 2024 · 0 comments

Comments

@mricon
Copy link

mricon commented Jan 9, 2024

Per RFC-2822, lines MUST NOT be longer than 998 characters:

2.1.1. Line Length Limits

There are two limits that this standard places on the number of
characters in a line. Each line of characters MUST be no more than
998 characters, and SHOULD be no more than 78 characters, excluding
the CRLF.

https://datatracker.ietf.org/doc/html/rfc2822#section-2.1.1

It appears that nullmailer will always unwrap To/Cc headers and re-concatenate them into a single long line even if this results in a header longer than 998 characters. Such messages will either be rejected by some mail servers (e.g. Exim), while others will force-insert <CR><LF><SPACE> at character 998 regardless of header content (e.g. Postfix, Sendmail).

When generating To/Cc headers, nullmailer should ensure that the line is not longer than 998 characters. If it is, make_recipient_list() should properly insert <CR><LF><SPACE> before continuing to add more recipients:

https://github.com/bruceg/nullmailer/blob/master/src/inject.cc#L384

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

No branches or pull requests

1 participant