GNU bug report logs -
#53412
27.1; sendmail does not wrap overlong lines
Previous Next
Reported by: Francesco Potortì <pot <at> gnu.org>
Date: Fri, 21 Jan 2022 15:18:02 UTC
Severity: normal
Tags: moreinfo
Found in version 27.1
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
I just discovered that checking overlong text lines is not enough.
Apparently calling mml-to-mime does not wrap overlong headers.
If there is an overlong header, other headers which are utf-8 escaped are not sent correctly, and the recipient sees something like this:
Subject: test =?utf-8?Q?=C3=A0?= b c
=?utf-8?Q?=C3=AC?=
Sending an identical email with long headers split into several lines makes the problem disappear.
RFC 5322 mandates mail line lengths less than 998 (including CRLF), and this is apparently not enforced by mml-to-mime for headers, I suppose it should.
My current workaround is:
(setq overlength 500) ; should by 998 including CRLF
(setq overlong-header-message "Overlong header at point: abort sending email.")
(add-hook 'mail-send-hook
;; should become useless with Emacs 29
(lambda ()
(and (mm-long-lines-p overlength)
(mml-to-mime)) ; break overlong text lines
;; Now check that no overlong headers exist
(save-restriction
(message-narrow-to-headers)
(goto-char (point-min))
(and (search-forward-regexp (make-string overlength ?.) nil t)
(error overlong-header-message)))))
90)
This bug report was last modified 3 years and 72 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.