GNU bug report logs - #79307
30.1; Rmail: MIME decoding failed

Previous Next

Package: emacs;

Reported by: Francesco Potortì <pot <at> potorti.it>

Date: Mon, 25 Aug 2025 09:53:01 UTC

Severity: normal

Found in version 30.1

Full log


Message #14 received at 79307 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: pot <at> potorti.it, 79307 <at> debbugs.gnu.org
Subject: Re: bug#79307: 30.1; Rmail: MIME decoding failed
Date: Sat, 30 Aug 2025 13:08:36 +0300
> Cc: 79307 <at> debbugs.gnu.org
> From: Robert Pluim <rpluim <at> gmail.com>
> Date: Tue, 26 Aug 2025 15:39:00 +0200
> 
> >>>>> On Mon, 25 Aug 2025 11:51:46 +0200, Francesco Potortì <pot <at> potorti.it> said:
> 
>     Francesco> Rmail says: "MIME decoding failed: (error Message is not a valid RFC 822 (or later) message)" when reading the attached mbox.  Apart from the error message, everything looks ok at first alright.  Sorry, no time to look at it at this the moment.
>     Francesco> To reproduce:
>     Francesco> - save the attachment
>     Francesco> - emacs -Q
>     Francesco> - C-u M-x rmail RET
>     Francesco> - the name of the saved attachment RET
> 
>     Francesco> For me, Rmail apparently does the right thing, but prints the above error message.
> 
> The issue is that the message in question is a digest, and rmail tries
> to copy out the headers from the component parts using
> `rmail-copy-headers', but the first part looks like this:
> 
> ---begin--
> --cc57bd385044d4e75b21e375607f07ba
> 
> Content-Type: text/plain
> 
> debian-changes-digest Digest				Volume 2025 : Issue 139
> 
> --end--
> 
> Which doesnʼt match rmailʼs expectations of it starting with a "From"
> line before the headers, hence rmail.el:2917 calls
> `rmail-error-bad-format'.

Isn't the actual problem that this digest doesn't say it's a digest?
rmailmm.el:rmail-mime-process-multipart seems to know about that.  The
digests sent by the emacs-diffs list, for example, have these two
parts:

  Content-Type: text/plain; charset="utf-8"
  MIME-Version: 1.0
  Content-Transfer-Encoding: base64
  Content-Description: Emacs-diffs Digest, Vol 273, Issue 66

  Content-Type: text/plain; charset="utf-8"
  MIME-Version: 1.0
  Content-Transfer-Encoding: base64
  Content-Description: Today's Topics (8 messages)

which the mbox file in question doesn't have.

So maybe we should instead try to identify such digests as such?  Just
getting past such lines sounds a bit dangerous to me.

Anyway, does anyone know whether the Debian digest indeed violate the
RFC-822 standard?




This bug report was last modified 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.