[GH-ISSUE #33] Install with brew? #29

Closed
opened 2026-03-15 12:11:31 +03:00 by kerem · 12 comments
Owner

Originally created by @laserhybiz on GitHub (Jan 31, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/33

Originally created by @laserhybiz on GitHub (Jan 31, 2023). Original GitHub issue: https://github.com/axllent/mailpit/issues/33
kerem 2026-03-15 12:11:31 +03:00
Author
Owner

@axllent commented on GitHub (Feb 1, 2023):

I'm sorry but I don't use Mac or brew (or ruby for that matter) so I have no experience here. From what I read though, anyone can become a maintainer of a Brew package which means maintaining the correct recipes and submitting merge requests every time there is a new Mailpit release (it isn't automated I think). I definitely won't be doing that, however please feel free to become a Brew package maintainer for this if you want to.

<!-- gh-comment-id:1411428922 --> @axllent commented on GitHub (Feb 1, 2023): I'm sorry but I don't use Mac or brew (or ruby for that matter) so I have no experience here. From what I read though, anyone can become a maintainer of a Brew package which means maintaining the correct recipes and submitting merge requests every time there is a new Mailpit release (it isn't automated I think). I definitely won't be doing that, however please feel free to become a Brew package maintainer for this if you want to.
Author
Owner

@mansoorkhan96 commented on GitHub (Feb 1, 2023):

@axllent Thanks for creating Mailpit.
A quick question:

How would i start or stop Mailpit as a service? Similar to homebrew and mailhog

whats the ulternative of following

brew services stop mailhog
<!-- gh-comment-id:1412436011 --> @mansoorkhan96 commented on GitHub (Feb 1, 2023): @axllent Thanks for creating Mailpit. A quick question: How would i start or stop Mailpit as a service? Similar to homebrew and mailhog whats the ulternative of following ```bash brew services stop mailhog ```
Author
Owner

@axllent commented on GitHub (Feb 1, 2023):

@mansoorkhan96 I honestly do not know anything about Brew, other than that it is a package manager used (mostly) on Mac.

Does the Brew installer for MailHog run it as a service too? I assumed it would just install the application (which then gets run manually from the command line). I may be horribly wrong though. If it does run MailHog as a service too, then I think it would be the same for Mailpit. The two applications (though very different code-wise) run very much the same, listen on the same ports etc . I guess you could just take the MailHog brew scripts and just accordingly for Mailpit.

Sorry, I feel completely useless here as I have literally zero experience or knowledge of Brew and ruby, nor any inclination to learn them for an installer package I don't use :) I'm sure there are plenty of people out there/here who do, and who can help though.

<!-- gh-comment-id:1412558978 --> @axllent commented on GitHub (Feb 1, 2023): @mansoorkhan96 I honestly do not know anything about Brew, other than that it is a package manager used (mostly) on Mac. Does the Brew installer for MailHog run it as a service too? I assumed it would just install the application (which then gets run manually from the command line). I may be horribly wrong though. If it does run MailHog as a service too, then I think it would be the same for Mailpit. The two applications (though very different code-wise) run very much the same, listen on the same ports etc . I guess you could just take the MailHog brew scripts and just accordingly for Mailpit. Sorry, I feel completely useless here as I have literally zero experience or knowledge of Brew and ruby, nor any inclination to learn them for an installer package I don't use :) I'm sure there are plenty of people out there/here who do, and who can help though.
Author
Owner

@jimafisk commented on GitHub (Feb 1, 2023):

@axllent I use Goreleaser to automate release builds and support different package managers for a project of mine and it's awesome.

For homebrew, you can manage your own tap relatively easily.

<!-- gh-comment-id:1412785240 --> @jimafisk commented on GitHub (Feb 1, 2023): @axllent I use [Goreleaser](https://goreleaser.com/) to automate release builds and support different package managers for a project of mine and it's awesome. For homebrew, you can manage your own [tap](https://docs.brew.sh/Taps) relatively easily. - Add it to your `.goreleaser.yml` (example: https://github.com/plentico/plenti/blob/master/.goreleaser.yml#L47) - Create a repo for it (example: https://github.com/plentico/homebrew-plenti) - In your `.github/workflows/release.yml` pass an access token so your project repo can write to your homebrew-tap repo (example: https://github.com/plentico/plenti/blob/master/.github/workflows/release.yml#L58)
Author
Owner

@muarachmann commented on GitHub (Feb 1, 2023):

+1

<!-- gh-comment-id:1412801296 --> @muarachmann commented on GitHub (Feb 1, 2023): +1
Author
Owner

@axllent commented on GitHub (Feb 2, 2023):

@jimafisk That's for the information, I had no idea one can simply manage ones own repo/tap! Although I have no intention of switching to Goreleaser (for various reasons), I am looking at other ways to try make this happen. Ideally it would run automatically as part of the Github Actions workflow, however any action I've found appears to require either archives named differently (hardcoded), or the build process to change significantly, neither of which I think is a good compromise.

I have however done some reading on these brew formulas, and if it is that simple as they appear, then I'm sure I can just generate the formula manually and update my homebrew repo. Given I still have zero experience with brew, could you please confirm that the formula would be as simple as something like this (obviously with the correct naming/data), more specifically bin.install "mailpit" being sufficient to extract the executable from the tarball and copy to the bin path?

<!-- gh-comment-id:1413117299 --> @axllent commented on GitHub (Feb 2, 2023): @jimafisk That's for the information, I had no idea one can simply manage ones own repo/tap! Although I have no intention of switching to Goreleaser (for various reasons), I am looking at other ways to try make this happen. Ideally it would run automatically as part of the Github Actions workflow, however any action I've found appears to require either archives named differently (hardcoded), or the build process to change significantly, neither of which I think is a good compromise. I have however done some reading on these brew formulas, and if it is that simple as they appear, then I'm sure I can just generate the formula manually and update my homebrew repo. Given I still have zero experience with brew, could you please confirm that the formula would be as simple as something like [this](https://github.com/askcloudarchitech/homebrew-askcloudarchitech/blob/main/askcloudhelloworld.rb) (obviously with the correct naming/data), more specifically `bin.install "mailpit"` being sufficient to extract the executable from the tarball and copy to the bin path?
Author
Owner

@jimafisk commented on GitHub (Feb 3, 2023):

I'm definitely not a brew expert (haven't used a mac in over a decade), but yes I'm pretty sure that simple ruby file is all you need to get a tap working. You'll need to specify the url for the release but after that the bin.install "mailpit" should work!

<!-- gh-comment-id:1414589913 --> @jimafisk commented on GitHub (Feb 3, 2023): I'm definitely not a brew expert (haven't used a mac in over a decade), but yes I'm pretty sure that simple ruby file is all you need to get a tap working. You'll need to specify the [url for the release](https://github.com/askcloudarchitech/homebrew-askcloudarchitech/blob/main/askcloudhelloworld.rb#L11) but after that the `bin.install "mailpit"` should work!
Author
Owner

@axllent commented on GitHub (Feb 3, 2023):

Could I get some feedback please? I have created a brew tap which includes Mailpit:

brew tap axllent/apps
brew install mailpit

I have only tested using Docker/Linux (amd64) so looking for feedback specifically from Mac arm64 & amd64. Thanks!

<!-- gh-comment-id:1415116854 --> @axllent commented on GitHub (Feb 3, 2023): Could I get some feedback please? I have created a [brew tap](https://github.com/axllent/homebrew-apps) which includes Mailpit: ```shell brew tap axllent/apps brew install mailpit ``` I have only tested using Docker/Linux (amd64) so looking for feedback specifically from Mac arm64 & amd64. Thanks!
Author
Owner

@binotaliu commented on GitHub (Feb 5, 2023):

@axllent I just tried that on my Intel Mac (Ventura 13.2) and can confirm that it works properly.
However I would suggest to rename the repository to axllent/homebrew-mailpit. By default, brew tap {username}/{repo} would lookup to {username}/homebrew-{repo} on GitHub. So no need to manually specify git url if you follow the naming convention. 1

<!-- gh-comment-id:1418198953 --> @binotaliu commented on GitHub (Feb 5, 2023): @axllent I just tried that on my Intel Mac (Ventura 13.2) and can confirm that it works properly. However I would suggest to rename the repository to `axllent/homebrew-mailpit`. By default, `brew tap {username}/{repo}` would lookup to `{username}/homebrew-{repo}` on GitHub. So no need to manually specify git url if you follow the naming convention. [^1] [^1]: <https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap#installing>
Author
Owner

@axllent commented on GitHub (Feb 5, 2023):

Thank you for testing and the information @binotaliu , I appreciate it. I'm actually planning of using the same repo for some other packages too (rather than having a separate repo per application just for brews), so if the only downside is the initial brew tap... command to add the repo, then I'll keep it as-is. I don't use brew, so this is just for those that find it easier.

<!-- gh-comment-id:1418289851 --> @axllent commented on GitHub (Feb 5, 2023): Thank you for testing and the information @binotaliu , I appreciate it. I'm actually planning of using the same repo for some other packages too (rather than having a separate repo per application just for brews), so if the only downside is the initial `brew tap...` command to add the repo, then I'll keep it as-is. I don't use brew, so this is just for those that find it easier.
Author
Owner

@axllent commented on GitHub (Feb 6, 2023):

Actually I realise I missed the logic/point in branch naming, so I changed the repo to axllent/homebrew-apps, meaning it gets added as brew tap axllent/apps (in which mailpit is found). This remains generic to include other apps, and allows for the shorthand addition to taps. I've updated my previous instructions in this thread to not confuse anyone. Thanks again for the help everyone.

<!-- gh-comment-id:1418379695 --> @axllent commented on GitHub (Feb 6, 2023): Actually I realise I missed the logic/point in branch naming, so I changed the repo to `axllent/homebrew-apps`, meaning it gets added as `brew tap axllent/apps` (in which mailpit is found). This remains generic to include other apps, and allows for the shorthand addition to taps. I've updated my previous instructions in this thread to not confuse anyone. Thanks again for the help everyone.
Author
Owner

@laserhybiz commented on GitHub (Feb 6, 2023):

🎉

<!-- gh-comment-id:1418701731 --> @laserhybiz commented on GitHub (Feb 6, 2023): 🎉
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#29
No description provided.