unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21608: 24.5; message-mode sends arbitrarily long headers
@ 2015-10-03  0:41 David Bremner
  2017-01-26 21:37 ` Lars Ingebrigtsen
  2017-01-26 21:53 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: David Bremner @ 2015-10-03  0:41 UTC (permalink / raw)
  To: 21608


1) run emacs -Q
2) M-x message-mail
3) insert a long header; "X-Stupid: " followed by the first 900 words in /usr/share/dict/words.
4) C-c C-c
5) select 'transport'

Now is the tricky part. You need to observe what actually hits the mail
transport. In my case I use a nullmailer transport with the ability to
log the complete message. At least for me, the header is unwrapped. This
causes messages to rejected by MTAs with strict adherence to RFC5322
section 2.1.1 which states a 998 character absolute limit on line length.

One could argue that this is user error/perversity, but it arrises
rather easily with References headers, and these are hidden by default,
so the user has no real clue there is a problem.


In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.16.6)
 of 2015-09-19 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11702000
System Description:	Debian GNU/Linux testing (stretch)

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-z,relro'

Important settings:
  value of $LANG: en_CA.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Mark set
Replaced 896 occurrences
scroll-down-command: Beginning of buffer
Mark set
Sending...
Mark set [2 times]
Sending via mail...
Setting `send-mail-function' temporarily since "emacs -q" would overwrite customizations
Sending...done
Making completion list...

Load-path shadows:
None found.

Features:
(shadow emacsbug mailalias cus-edit cus-start cus-load wid-edit
cl-loaddefs cl-lib sendmail mail-extr sort help-mode gnus-util message
format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns
mail-prsvr mailabbrev mail-utils gmm-utils mailheader time-date tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 125836 18133)
 (symbols 48 19411 0)
 (miscs 40 72 200)
 (strings 32 13690 4848)
 (string-bytes 1 388741)
 (vectors 16 10803)
 (vector-slots 8 398787 10342)
 (floats 8 77 346)
 (intervals 56 3885 779)
 (buffers 960 15)
 (heap 1024 31763 882))





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21608: 24.5; message-mode sends arbitrarily long headers
  2015-10-03  0:41 bug#21608: 24.5; message-mode sends arbitrarily long headers David Bremner
@ 2017-01-26 21:37 ` Lars Ingebrigtsen
  2017-01-26 21:53 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-26 21:37 UTC (permalink / raw)
  To: David Bremner; +Cc: 21608

David Bremner <david@tethera.net> writes:

> 1) run emacs -Q
> 2) M-x message-mail
> 3) insert a long header; "X-Stupid: " followed by the first 900 words in /usr/share/dict/words.
> 4) C-c C-c
> 5) select 'transport'
>
> Now is the tricky part. You need to observe what actually hits the mail
> transport. In my case I use a nullmailer transport with the ability to
> log the complete message. At least for me, the header is unwrapped. This
> causes messages to rejected by MTAs with strict adherence to RFC5322
> section 2.1.1 which states a 998 character absolute limit on line length.

How odd.  I can't find any code that either checks or folds too-long
headers when sending mail.  (There's some when sending news.)  Odd that
nobody has complained about this before...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21608: 24.5; message-mode sends arbitrarily long headers
  2015-10-03  0:41 bug#21608: 24.5; message-mode sends arbitrarily long headers David Bremner
  2017-01-26 21:37 ` Lars Ingebrigtsen
@ 2017-01-26 21:53 ` Lars Ingebrigtsen
  2017-01-27 11:00   ` Andreas Schwab
  1 sibling, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-26 21:53 UTC (permalink / raw)
  To: David Bremner; +Cc: 21608

This should now be fixed on the Emacs master, as the very long Foo:
header in this mail should demonstrate, I hope.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21608: 24.5; message-mode sends arbitrarily long headers
  2017-01-26 21:53 ` Lars Ingebrigtsen
@ 2017-01-27 11:00   ` Andreas Schwab
  2017-01-27 11:35     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2017-01-27 11:00 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: David Bremner, 21608

On Jan 26 2017, Lars Ingebrigtsen <larsi@gnus.org> wrote:

> This should now be fixed on the Emacs master, as the very long Foo:
> header in this mail should demonstrate, I hope.

The Foo: header has just 896 characters, and appears to have been
truncated (the last word is "arbitraril").

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21608: 24.5; message-mode sends arbitrarily long headers
  2017-01-27 11:00   ` Andreas Schwab
@ 2017-01-27 11:35     ` Lars Ingebrigtsen
  2017-01-27 11:49       ` David Bremner
  2017-01-27 13:04       ` Andreas Schwab
  0 siblings, 2 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-27 11:35 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: David Bremner, 21608

Andreas Schwab <schwab@linux-m68k.org> writes:

> On Jan 26 2017, Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
>> This should now be fixed on the Emacs master, as the very long Foo:
>> header in this mail should demonstrate, I hope.
>
> The Foo: header has just 896 characters, and appears to have been
> truncated (the last word is "arbitraril").

If you look at the message in the bug tracker, the Foo header starts with

Foo: Re: bug#21608: 24.5; message-mode sends arbitrarily long headersRe:
 bug#21608: 24.5; message-mode sends arbitrarily long headersRe: bug#21608:
 24.5; message-mode sends arbitrarily long headersRe: bug#21608: 24.5;
 message-mode sends arbitrarily long headersRe: bug#21608: 24.5;

and runs for about 3K.  So if you got a shorter header, I think that
means that something on your side truncated the header.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21608: 24.5; message-mode sends arbitrarily long headers
  2017-01-27 11:35     ` Lars Ingebrigtsen
@ 2017-01-27 11:49       ` David Bremner
  2017-01-27 13:04       ` Andreas Schwab
  1 sibling, 0 replies; 8+ messages in thread
From: David Bremner @ 2017-01-27 11:49 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Andreas Schwab; +Cc: 21608

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Andreas Schwab <schwab@linux-m68k.org> writes:
>
>> On Jan 26 2017, Lars Ingebrigtsen <larsi@gnus.org> wrote:
>>
>>> This should now be fixed on the Emacs master, as the very long Foo:
>>> header in this mail should demonstrate, I hope.
>>
>> The Foo: header has just 896 characters, and appears to have been
>> truncated (the last word is "arbitraril").
>
> If you look at the message in the bug tracker, the Foo header starts with
>
> Foo: Re: bug#21608: 24.5; message-mode sends arbitrarily long headersRe:
>  bug#21608: 24.5; message-mode sends arbitrarily long headersRe: bug#21608:
>  24.5; message-mode sends arbitrarily long headersRe: bug#21608: 24.5;
>  message-mode sends arbitrarily long headersRe: bug#21608: 24.5;
>

FWIW, I can confirm receipt of the long header here.

d





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21608: 24.5; message-mode sends arbitrarily long headers
  2017-01-27 11:35     ` Lars Ingebrigtsen
  2017-01-27 11:49       ` David Bremner
@ 2017-01-27 13:04       ` Andreas Schwab
  2017-01-27 13:07         ` Lars Ingebrigtsen
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2017-01-27 13:04 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: David Bremner, 21608

On Jan 27 2017, Lars Ingebrigtsen <larsi@gnus.org> wrote:

> If you look at the message in the bug tracker, the Foo header starts with
>
> Foo: Re: bug#21608: 24.5; message-mode sends arbitrarily long headersRe:
>  bug#21608: 24.5; message-mode sends arbitrarily long headersRe: bug#21608:
>  24.5; message-mode sends arbitrarily long headersRe: bug#21608: 24.5;
>  message-mode sends arbitrarily long headersRe: bug#21608: 24.5;
>
> and runs for about 3K.  So if you got a shorter header, I think that
> means that something on your side truncated the header.

Then it must have been broken by gmane.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21608: 24.5; message-mode sends arbitrarily long headers
  2017-01-27 13:04       ` Andreas Schwab
@ 2017-01-27 13:07         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-27 13:07 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: David Bremner, 21608

Andreas Schwab <schwab@linux-m68k.org> writes:

> Then it must have been broken by gmane.

Oh, yeah, NNTP headers can't be longer than 1K.  So Gmane truncates
them.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-27 13:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-03  0:41 bug#21608: 24.5; message-mode sends arbitrarily long headers David Bremner
2017-01-26 21:37 ` Lars Ingebrigtsen
2017-01-26 21:53 ` Lars Ingebrigtsen
2017-01-27 11:00   ` Andreas Schwab
2017-01-27 11:35     ` Lars Ingebrigtsen
2017-01-27 11:49       ` David Bremner
2017-01-27 13:04       ` Andreas Schwab
2017-01-27 13:07         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).