The storage of .eml files is disrupted by emails with Message-IDs that contain slash ("/") characters #67

Open
opened 2026-04-05 16:16:21 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @neteddie on 1/2/2026

The storage of .eml files in OpenArchiver is disrupted by emails with Message-IDs that contain slash ("/") characters.

Currently, OpenArchiver stores each email as a separate .eml file in its data directory. The file names seem to be based on both the name of the mailbox folder from which the email was downloaded and the Message-ID from the email’s header.

In my case, there are several emails with Message-IDs that contain the "/" (slash) character, for example, Message-ID: E5-udobi62c-nr273/4/1143-01hrpqnb@artegic.net.
This results in the .eml file being stored as 1143-01hrpqnb@artegic.net.eml in a subfolder 4 of a folder whose name ends with <E5-udobi62c-nr273. When there are many such Message-IDs, the folder structure becomes very messy.

A potential solution would be to design the .eml file names in a way that avoids using characters that have special meaning in the file system. This could be achieved by assigning each file an arbitrary unique name (e.g., a SHA-256 hash) consisting only of safe characters such as 'A'..'Z' and '0'..'9'.

Additionally, I would prefer that all mail files from a mailbox folder be stored in its own subfolder. It would be acceptable to include the name of the mailbox folder (made file system-safe, if necessary!) as part of the .eml file name.

*Originally created by @neteddie on 1/2/2026* The storage of .eml files in OpenArchiver is disrupted by emails with Message-IDs that contain slash ("/") characters. Currently, OpenArchiver stores each email as a separate .eml file in its data directory. The file names seem to be based on both the name of the mailbox folder from which the email was downloaded and the Message-ID from the email’s header. In my case, there are several emails with Message-IDs that contain the "/" (slash) character, for example, `Message-ID: E5-udobi62c-nr273/4/1143-01hrpqnb@artegic.net`. This results in the .eml file being stored as `1143-01hrpqnb@artegic.net.eml` in a subfolder `4` of a folder whose name ends with `<E5-udobi62c-nr273`. When there are many such Message-IDs, the folder structure becomes very messy. A potential solution would be to design the .eml file names in a way that avoids using characters that have special meaning in the file system. This could be achieved by assigning each file an arbitrary unique name (e.g., a SHA-256 hash) consisting only of safe characters such as 'A'..'Z' and '0'..'9'. Additionally, I would prefer that all mail files from a mailbox folder be stored in its own subfolder. It would be acceptable to include the name of the mailbox folder (made file system-safe, if necessary!) as part of the .eml file name.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OpenArchiver#67