Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mailbox Babyl support can't cope with messages that have no body #114580

Open
jikamens opened this issue Jan 26, 2024 · 3 comments
Open

mailbox Babyl support can't cope with messages that have no body #114580

jikamens opened this issue Jan 26, 2024 · 3 comments
Labels
topic-email type-bug An unexpected behavior, bug, or error

Comments

@jikamens
Copy link

jikamens commented Jan 26, 2024

Bug report

Bug description:

The Babyl message file format allows messages to have a header only, no body. In this case there is just a message header between the *** EOOH *** and ^_^L, with no blank lines at the end. The Python module crashes with an assertion failure when it encounters this. It even crashes if you add a blank line; you have to add two blank lines, one representing the separator between the header and the body, and one representing body content (i.e., it can't cope with an empty body), to make the assertion failure go away.

The module should allow a header-only message with no separator or body.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

@jikamens jikamens added the type-bug An unexpected behavior, bug, or error label Jan 26, 2024
@serhiy-storchaka
Copy link
Member

Thank you for your report @jikamens. Are you interesting in creating a PR? If not, I'll do this myself, but I want to ask you first.

BTW, do you have a reference to the Babyl message file format specification?

@jikamens
Copy link
Author

Thank you for your report @jikamens. Are you interesting in creating a PR? If not, I'll do this myself, but I want to ask you first.

I will put it on my to-do list, but my to-do list is very long so I honestly can't say when I will get to it.

BTW, do you have a reference to the Babyl message file format specification?

I don't think there is a reference for the Babyl message file format. I looked and could not find one. I think the only reference is how Emacs interprets Babyl files. Having used Emacs Rmail (which uses Babyl files under the hood) for many years—though I don't anymore, which is why I was converting files and discovered this issue and the other one I filed—I'm pretty confident that I'm right about these two issues, because I know Emacs handled my Babyl files properly and they had both of these issues when I ran them through Python.

@serhiy-storchaka
Copy link
Member

The closest to the specification that I found is:
https://home.cs.colorado.edu/~main/cs1300-old/emacs/etc/BABYL

But it is still not clear whether message can omit a body and a newline between headers and an empty body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-email type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants