Workflows Archive mirror
 help / color / mirror / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: robh@kernel.org, users@linux.kernel.org, workflows@vger.kernel.org
Subject: PSA: nullmailer should be avoided
Date: Tue, 9 Jan 2024 16:47:22 -0500	[thread overview]
Message-ID: <20240109-alluring-fanatic-manul-cfa5d2@lemur> (raw)

Hi, all:

I know some of you use nullmailer for sending outgoing mail, but it *really*
must be avoided, as the messages it sends are not RFC-2822 compliant. Per that
RFC, header lines MUST NOT be longer than 998 characters in length, which is
not something nullmailer appears to be paying any attention to.

Some mailservers will outright reject messages with lines exceeding 998
characters (Exim), and some will force-insert <CR><LF><SPACE> at exactly
character 998, regardless of what that does to the header:

https://lore.kernel.org/linux-kernel/20240109171807.GA2783042-robh@kernel.org/raw

You will notice, that the enforced line-break cuts across the email address:

       Cc: [...] Sergey Shtylyov <s.shtyl
        yov@omp.ru>

A message with such header *may* get delivered, or it may get rejected due to
malformed headers (e.g. Exim does that by default). Anyone then attempting to
reply to such message will likely have trouble as well.

Unfortunately, nullmailer appears to always re-parse To/Cc headers, so even if
the original email properly wrapped the recipients headers before it was fed
to nullmailer, everything will then just be concatenated into one long line:

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

I'll open an issue with nullmailer about this, but the project doesn't appear
very alive, so your best bet is to switch to msmtp. It has
msmtp-{enqueue,listqueue,runqueue} commands that will do everything nullmailer
can do and won't break your mail.

-K

             reply	other threads:[~2024-01-09 21:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 21:47 Konstantin Ryabitsev [this message]
2024-01-10 17:47 ` PSA: nullmailer should be avoided Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240109-alluring-fanatic-manul-cfa5d2@lemur \
    --to=konstantin@linuxfoundation.org \
    --cc=robh@kernel.org \
    --cc=users@linux.kernel.org \
    --cc=workflows@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).