Skip to content

feat(dev-env)!: Replace MailHog with Mailpit#1329

Merged
sjinks merged 3 commits intodevelopfrom
replace-mailhog-with-mailpit
Apr 27, 2023
Merged

feat(dev-env)!: Replace MailHog with Mailpit#1329
sjinks merged 3 commits intodevelopfrom
replace-mailhog-with-mailpit

Conversation

@sjinks
Copy link
Copy Markdown
Member

@sjinks sjinks commented Apr 10, 2023

Description

Mailhog is not maintained anymore. Moreover, it has serious bugs that make it inconvenient to use:

mailhog-1
mailhog-2

Mailpit is a faster alternative to MailHog; it is recommended, for example, by Laravel.

This PR replaces MailHog with Mailpit, retaining backward compatibility. As a side effect, there is now one more Lando plugin that we can drop: @lando/mailhog.

Backward Compatibility

  1. .lando.yml is rebuilt automatically (because we removed @lando/mailhog).
  2. In instance_data.json, mailhog is treated as a synonym to mailpit.
  3. --mailhog command line switch is aliased to --mailpit (and triggers a deprecation warning).

Steps to Test

E2E tests should pass.

@sjinks sjinks force-pushed the replace-mailhog-with-mailpit branch from f45a098 to be4526a Compare April 10, 2023 01:45
@sjinks sjinks requested review from alecgeatches, pschoffer and rinatkhaziev and removed request for rinatkhaziev April 10, 2023 01:46
@sjinks sjinks marked this pull request as ready for review April 10, 2023 02:48
@sjinks sjinks self-assigned this Apr 10, 2023
@sjinks
Copy link
Copy Markdown
Member Author

sjinks commented Apr 10, 2023

Another improvement is that Mailpit's image is much smaller than MailHog's:

mailhog/mailhog:v1.0.1: 392MB
axllent/mailpit:latest: 24.5MB

@sjinks
Copy link
Copy Markdown
Member Author

sjinks commented Apr 10, 2023

There is one semi-blocking issue: axllent/mailpit#87 (I have a workaround).

mailhog:
type: mailhog
<% if ( mailpit ) { %>
mailpit:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice I like that we have our custom service for this. Less magic is good.

@sjinks
Copy link
Copy Markdown
Member Author

sjinks commented Apr 11, 2023

As per this comment, now using msmtp to talk to mailpit. Works flawlessly.

@sjinks
Copy link
Copy Markdown
Member Author

sjinks commented Apr 11, 2023

This is how it looks after Automattic/vip-container-images#464 and Automattic/vip-container-images#465:

Screenshot_20230411_144651
Screenshot_20230411_144726

@sjinks sjinks force-pushed the replace-mailhog-with-mailpit branch from 8369958 to ab71875 Compare April 18, 2023 10:52
@sjinks sjinks force-pushed the replace-mailhog-with-mailpit branch from ab71875 to c0eff03 Compare April 18, 2023 13:21
@sjinks sjinks merged commit 7852214 into develop Apr 27, 2023
@sjinks sjinks deleted the replace-mailhog-with-mailpit branch April 27, 2023 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants