Add Option to Easily Extract Attachments from Emails Without Packaging into .eml Files
I noticed that when sending emails with attachments (using tools like swaks), the attachments are bundled inside the .eml file in Base64 format.
When sending an email with swaks and using the --attach option, PaperCut captures the entire email (along with attachments) in a single .eml file, but its better to have an option where the attachments are automatically saved in the same directory (or configurable path) as separate files rather than being packaged within the .eml file.
but its better to have an option where the attachments are automatically saved in the same directory
Why is that better?
In v7.0 there is a new rule called "Invoke Process":
You can use that execute a small utility that can extract the attachments out of the EML, if you want. Something like this: https://pypi.org/project/eml-extractor/
File attachments have file names. Saving them in the same folder would lead to conflicts between emails.
Emails can have any number of mime bodies. Papercut is a simple email server. I think it makes perfect sense for it to save the eml file in its entirety, and not interpret one or the other type of content one way or another. If you want it to save file attachments separately, maybe you also want it to save HTML and plaintext bodies as HTML and txt files? Where does it end? Is that still a simple server?
You didn't describe a use case. For me, a single eml for every email makes perfect sense.
I'd need more information about use case. I think this would be better solved by a small CLI tool.