all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* rmail invalid mbox file
@ 2021-05-04 23:31 Jim Erickson
  2021-05-05  2:31 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Jim Erickson @ 2021-05-04 23:31 UTC (permalink / raw)
  To: help-gnu-emacs

i am using rmail in emacs 27.2 on openbsd 6.9 on raspberrypi 4B 8gb
aarch64. i use fetchmail and procmail to deliver my gmail to
/home/jim/RMAIL. all rmail settings are at standard defaults. when i
try to open rmail to process my gmail it says the following:

Debugger entered--Lisp error: (error "Invalid mbox file")
  signal(error ("Invalid mbox file"))
  error("Invalid mbox file")
  rmail-convert-file-maybe()
  rmail()
  funcall-interactively(rmail)
  call-interactively(rmail)
  menu-bar-read-mail()
  funcall-interactively(menu-bar-read-mail)
  call-interactively(menu-bar-read-mail nil nil)
  command-execute(menu-bar-read-mail)

i am using the standard RMAIL file formed by receiving mail through
fetchmail + procmail. can anyone tell me how to form a valid mbox file
so i can use rmail to process and read my gmail?



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

* Re: rmail invalid mbox file
  2021-05-04 23:31 Jim Erickson
@ 2021-05-05  2:31 ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2021-05-05  2:31 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Jim Erickson <jimerickso@gmail.com>
> Date: Tue, 4 May 2021 18:31:37 -0500
> 
> i am using rmail in emacs 27.2 on openbsd 6.9 on raspberrypi 4B 8gb
> aarch64. i use fetchmail and procmail to deliver my gmail to
> /home/jim/RMAIL. all rmail settings are at standard defaults. when i
> try to open rmail to process my gmail it says the following:
> 
> Debugger entered--Lisp error: (error "Invalid mbox file")
>   signal(error ("Invalid mbox file"))
>   error("Invalid mbox file")
>   rmail-convert-file-maybe()
>   rmail()
>   funcall-interactively(rmail)
>   call-interactively(rmail)
>   menu-bar-read-mail()
>   funcall-interactively(menu-bar-read-mail)
>   call-interactively(menu-bar-read-mail nil nil)
>   command-execute(menu-bar-read-mail)
> 
> i am using the standard RMAIL file formed by receiving mail through
> fetchmail + procmail. can anyone tell me how to form a valid mbox file
> so i can use rmail to process and read my gmail?

Can you show the first line of that mbox file?



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

* rmail invalid mbox file
@ 2021-05-05 11:37 Jim Erickson
  2021-05-05 12:23 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Jim Erickson @ 2021-05-05 11:37 UTC (permalink / raw)
  To: help-gnu-emacs

yes the first line of the mbox file reads as follows:

Return-Path: <jim@openbsd1.jimerickson.info>




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

* Re: rmail invalid mbox file
  2021-05-05 11:37 Jim Erickson
@ 2021-05-05 12:23 ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2021-05-05 12:23 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Jim Erickson <jimerickso@gmail.com>
> Date: Wed, 05 May 2021 06:37:47 -0500
> 
> yes the first line of the mbox file reads as follows:
> 
> Return-Path: <jim@openbsd1.jimerickson.info>

That's the problem: the first line of each email message in an mbox
file should look something like this:

  From help-gnu-emacs-bounces+eliz=gnu.org@gnu.org Wed May 05 07:46:37 2021

That is, it must start with "From ", then a valid email address, then
date and time.  Return-Path: should be on the next line.

Do you have the "From " lines there, perhaps on lines after
Return-Path?  If so, maybe you could reorder the lines with Sed or
with Emacs, to get a usable mbox file.



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

* rmail invalid mbox file
@ 2021-05-05 14:26 Jim Erickson
  2021-05-05 14:51 ` Eli Zaretskii
  2021-05-05 15:51 ` tomas
  0 siblings, 2 replies; 8+ messages in thread
From: Jim Erickson @ 2021-05-05 14:26 UTC (permalink / raw)
  To: help-gnu-emacs

thank you it is good to at least know what the problem is. is this a new
google policy to write things this way? my "From:" line comes after a
bunch of other headers. how does one go about reordering lines in the
mbox with emacs? otherwise i guess i will have to switch to gnus. gnus
seems to handle the messages fine. 



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

* Re: rmail invalid mbox file
  2021-05-05 14:26 Jim Erickson
@ 2021-05-05 14:51 ` Eli Zaretskii
  2021-05-05 15:51 ` tomas
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2021-05-05 14:51 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Jim Erickson <jimerickso@gmail.com>
> Date: Wed, 05 May 2021 09:26:30 -0500
> 
> thank you it is good to at least know what the problem is. is this a new
> google policy to write things this way?

I don't know, I never used this method of getting email in mbox
format.

> my "From:" line comes after a bunch of other headers.

No, "From:" (with the colon) is just an email header.  That's not the
line that needs to begin each emacs.  You need a line that says "From"
without the colon.  It sounds like such a line is completely absent
from your file, in which case Rmail will not be able to process it,
because that's how it knows that a new email message begins.

> how does one go about reordering lines in the mbox with emacs?
> otherwise i guess i will have to switch to gnus. gnus seems to
> handle the messages fine.

I think in your case using Gnus is indeed the right idea.



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

* Re: rmail invalid mbox file
  2021-05-05 14:26 Jim Erickson
  2021-05-05 14:51 ` Eli Zaretskii
@ 2021-05-05 15:51 ` tomas
  1 sibling, 0 replies; 8+ messages in thread
From: tomas @ 2021-05-05 15:51 UTC (permalink / raw)
  To: Jim Erickson; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 616 bytes --]

On Wed, May 05, 2021 at 09:26:30AM -0500, Jim Erickson wrote:
> thank you it is good to at least know what the problem is. is this a new
> google policy to write things this way? my "From:" line ...

Careful. You are looking for a line starting with "From", *with no
colon*. This is the so-called "envelope from", aka "bounce address" [1].
The address there comes from the (last) SMTP protocol exchange.

The "From:" (with a colon) you are seeing is probably just an ordinary
mail header, which, as seen from the SMTP protocol is part of the mail
body.

Cheers

[1] https://en.wikipedia.org/wiki/Bounce_address
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* rmail invalid mbox file
@ 2021-05-06 16:31 Jim Erickson
  0 siblings, 0 replies; 8+ messages in thread
From: Jim Erickson @ 2021-05-06 16:31 UTC (permalink / raw)
  To: help-gnu-emacs

well i figured out a solution and got rmail working. i removed procmail
and setup opensmtpd to deliver everything to the spool then put a
.forward file in my home directory telling it to forward to
~/RMAIL. worked like a charm. just thought i would let the list know for
anyone else who has this problem in the future. thanks.



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

end of thread, other threads:[~2021-05-06 16:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-06 16:31 rmail invalid mbox file Jim Erickson
  -- strict thread matches above, loose matches on Subject: below --
2021-05-05 14:26 Jim Erickson
2021-05-05 14:51 ` Eli Zaretskii
2021-05-05 15:51 ` tomas
2021-05-05 11:37 Jim Erickson
2021-05-05 12:23 ` Eli Zaretskii
2021-05-04 23:31 Jim Erickson
2021-05-05  2:31 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.