-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add API call to dump all messages in text format .. WAS Bring back MailDir storage. #443
Comments
Let me start off by pointing out that MailHog's "maildir" storage is not maildir at all, it just writes the emails directly to a specified folder similar to maildir, except the maildir format includes a structured format which MailHog does not. Also, Mailpit is not a fork of MailHog, it's a completely separate application that shares similar functionality, so there is nothing to "bring back" as it never had maildir storage ;-) Finally, I will also state that Mailpit will never use maildir to store & read messages, vs: the database. I know you already said this, I am just stating it for anyone else who may read this. MailHog's "maildir" storage is ridiculously inefficient and CPU intensive. It's not all related to maildir storage of course, much of it is due to the inefficiencies of how MailHog processes messages, but it's a good indicator of the general performance differences between the two.
So to get back to your request... I am trying to understand the real use-case here. The intended approach to integration testing is to use the API, which could be as simple as Exporting all messages from the database I can understand the use-case for though, so there is currently no need to elaborate on this. I think a manual way of exporting all messages in plain text format (similar to "maildir") is a good idea. So, for now, could you please explain any downside to using the API to retrieve the latest message in your basic testing? |
It really is awesome! That's a heck of a performance boost, congrats.. Sorry I thought since you have that silly Chaos Jim monkey thing in this service too that it was a continuation... vs a scratch thing.. thanks for the correction. If there was an API call to dump all the messages to text that would completely address my need as an easy way to preserve them all after a CI run. (even it seems like a tool to do this through the API might be possible but I assume slower than a single API call to do it) .. and yes we will use the API for any new test cases... Thx u. |
Many features from MailHog are "replicated" due to user demand as they are required for various integration testing, however Mailpit is ultimately a "from scratch" thing. Mailpit does however bring a range of additional features, completely different UI, and of course major performance improvements (which was originally the whole reason I started it). The API doesn't currently have a "dump all" feature, however I will look into a method of utilising either the API or the database file directly (as a choice) to dump all messages to a directory. I see this as a useful general addition for archiving/export purposes. Leave this with me 👍 |
Can you re-enable the MailDir repository feature so that messages get dumped on the filesystem like was possible with MailHog? It wouldn't have to replace the DB setup... the source of truth could continue being the DB, just automatically write out the messages to a filesystem optionally.. tthe Maildir format is a standard that goes way back.. it's something easy to tar up and upload as an artifact in CI or pass around. Having the raw messages in text format where
sed
,awk
andgrep
can be used against them was really convenient in MailHog for basic test cases.. it seems like this would be pretty easy and is really the only thing that makes mailpit is worse than Mailhog was.The text was updated successfully, but these errors were encountered: