Eml emails file, extract MessageID, From and Subject

I need to keep certain eml email messages in Mayan; they must be saved exactly as they are, without any modifications. The “watch folder” source should be used to upload these files in Mayan. Is there a method to extract the labels MessageID, From, and Subject from these eml files as an IMAP or POP3 source and add them to the corresponding metadata?

I need to keep certain eml email messages in Mayan; they must be saved exactly as they are, without any modifications.

This is the core philosophy in Mayan, files are never modified, all interactions are done with database models that represent the file and the image previews. So much so that Mayan is one of a handful of software whose documents are admissible as evidence in legal proceedings because the chain of custody is never broken.

The “watch folder” source should be used to upload these files in Mayan. Is there a method to extract the labels MessageID, From, and Subject from these eml files as an IMAP or POP3 source and add them to the corresponding metadata?

This was added in version 4.4 for .msg files (Version 4.4 — Mayan EDMS 4.5.8 documentation). The values are extract as file metadata and using a workflow can be copied over as document metadata.

If you can provide an .eml file with known values and no private or personal information we can start testing to see if .eml support can be added.

1 Like

This was added in version 4.4 for .msg files (Version 4.4 — Mayan EDMS 4.4.2 documentation). The values are extract as file metadata and using a workflow can be copied over as document metadata.

The issue with using .msg is that it is a proprietary format, meaning the Italian government won’t recognize it in the longterm archiving or for legal preservation. EML and MBOX are the only formats that are accepted.
These two formats are open formats; RFC4155 describes.mbox files, while RFC822 specifies.eml.

If you can provide an .eml file with known values and no private or personal information we can start testing to see if .eml support can be added.

Yes, I have some eml files that I received from Gmail using a Python script. I may share these files with you if you contact me directly.

1 Like

Hi all , was there any progress on this ticket ? I would also like to be able to process eml files.

Partial. The changes to generalize the extraction and use of the email properties were merged (called source metadata) but support for .eml files was backlogged for a future version.

Support for this was included in version 4.5, in the form of the feature called source metadata.

https://docs.mayan-edms.com/releases/4.5.html#sources

EML support has been added in development and will be included in version 4.7 to be release soon.

2 Likes

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.