Skip to content

EML flag gives only errors #37

@Disonantemus

Description

@Disonantemus

Today I found out that reader can work with EML files, then I tried the --eml flag with some emails, and ... from 20 eml files, 20 (all) gives errors, none was shown as expected.

Using mbox2eml

I did convert a mbox file to many eml files (Spanish emails):

mbox2eml < in.mbox

The output from 16 (from 20) files was similar to:

reader --eml in.eml
message: malformed MIME header key: From "user123456@notarealemail.com" Fri Mar 13 11

Same files was able to be shown not using --eml flag

Output from 4 (from 20) files:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xd2c6ab]

goroutine 1 [running]:
github.com/mrusme/journalist/crawler.(*Crawler).FromAuto(0xc0004b3a58?, 0x5f?)
	/home/runner/go/pkg/mod/github.com/mrusme/journalist@v1.0.1/crawler/crawler.go:134 +0x2b
github.com/mrusme/reader/cmd.MakeReadable(0xc0004b3bb0, 0x0?, 0x1)
	/home/runner/work/reader/reader/cmd/root.go:65 +0xa5
github.com/mrusme/reader/cmd.init.func1(0xc0001fee00?, {0xc000424840, 0x1, 0xf568a6?})
	/home/runner/work/reader/reader/cmd/root.go:345 +0x208
github.com/spf13/cobra.(*Command).execute(0x1ab9ca0, {0xc0000327c0, 0x2, 0x2})
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1019 +0xa7b
github.com/spf13/cobra.(*Command).ExecuteC(0x1ab9ca0)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x40c
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071
github.com/mrusme/reader/cmd.Execute()
	/home/runner/work/reader/reader/cmd/root.go:439 +0x272
main.main()
	/home/runner/work/reader/reader/reader.go:6 +0xf

Using mboxshell

i did open the same mbox file and extract some eml files with export option, and get:

reader --eml in.eml
unknown charset: unknown charset: message: unhandled charset "windows-1252"

The same file was able to be shown with reader, when it's not used the --eml flag.

System

distro: Arch Linux x86_64
kernel: 6.18.25-1-lts
shell: bash 5.3.9
term: foot 1.27.0
multiplexer: tmux 3.6b
reader: 0.5 (Last binary)

All packages updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions