[GH-ISSUE #90] Provide sendmail binary with the releases? #58

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

Originally created by @msaggiorato on GitHub (Apr 14, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/90

Is there the possibility to provide the already built sendmail binary for supported architectures along with each release in GH?

Thanks!

Originally created by @msaggiorato on GitHub (Apr 14, 2023). Original GitHub issue: https://github.com/axllent/mailpit/issues/90 Is there the possibility to provide the already built sendmail binary for supported architectures along with each release in GH? Thanks!
kerem closed this issue 2026-03-15 12:19:33 +03:00
Author
Owner

@axllent commented on GitHub (Apr 14, 2023):

Out of interest, what OS are you referring to specifically?

<!-- gh-comment-id:1509129893 --> @axllent commented on GitHub (Apr 14, 2023): Out of interest, what OS are you referring to specifically?
Author
Owner

@axllent commented on GitHub (Apr 15, 2023):

In relation to my previous message, would it work if I was to provide pre-compiled sendmail binaries as a separate download in the releases? That means that for every mailpit-<platform>-<arch>.tar.gz there would also be a sendmail-<platform>-<arch>.tar.gz.

I really do not want to bundle sendmail into the mailpit archive as it will increase the file size, and most users do not need sendmail (ie: they either use system-installed sendmail version, create a symlink to mailpit, or use mailpit sendmail as their sending command).

<!-- gh-comment-id:1509421837 --> @axllent commented on GitHub (Apr 15, 2023): In relation to my previous message, would it work if I was to provide pre-compiled sendmail binaries as a separate download in the releases? That means that for every `mailpit-<platform>-<arch>.tar.gz` there would also be a `sendmail-<platform>-<arch>.tar.gz`. I really do not want to bundle sendmail into the mailpit archive as it will increase the file size, and most users do not need sendmail (ie: they either use system-installed sendmail version, create a symlink to mailpit, or use `mailpit sendmail` as their sending command).
Author
Owner

@msaggiorato commented on GitHub (Apr 15, 2023):

Yeah for sure, that's what I meant, include the Sendmail binaries separately.

This would help with easy setup in environments where sendmail is not present (docker) and also make it easy to install by os and architecture.

One project we're thinking of replacing mailhog with mailpit is VVV (WordPress development environment).

<!-- gh-comment-id:1509424342 --> @msaggiorato commented on GitHub (Apr 15, 2023): Yeah for sure, that's what I meant, include the Sendmail binaries separately. This would help with easy setup in environments where sendmail is not present (docker) and also make it easy to install by os and architecture. One project we're thinking of replacing mailhog with mailpit is VVV (WordPress development environment).
Author
Owner

@msaggiorato commented on GitHub (Apr 15, 2023):

Regarding your answer, is mailpit sendmail an equivalent to the raw sendmail executable I'm asking about here?

I would be interested in running mailpit in its own container. Can a host:port be specified here?

<!-- gh-comment-id:1509425020 --> @msaggiorato commented on GitHub (Apr 15, 2023): Regarding your answer, is `mailpit sendmail` an equivalent to the raw `sendmail` executable I'm asking about here? I would be interested in running mailpit in its own container. Can a `host:port` be specified here?
Author
Owner

@axllent commented on GitHub (Apr 15, 2023):

As explained in the README, you can use the mailpit sendmail command instead of using sendmail directly, is it the equivalent. Alternatively you can symlink sendmail to mailpit and Mailpit will invoke sendmail (ln -s /usr/sbin/sendmail /path/to/mailpit). It really depends what exactly you wish to achieve here, and both those options are only helpful if you are running Mailpit on the same machine as the server that is sending the mail (ie: same as the PHP instance).

Please note that mailpit's sendmail it is configured by default to relay messages to localhost:1025 (Mailpit's default port). This can be changed via an environment variable or commandline flag (--smtp-addr), however as far as your docker container question goes, you can also map a different port to the docker's port 1025 (so leaving Mailpit to run on its default ports). I don't know your environment is structured, how to plan to connect to it (Docker within vagrant?), or from what, so I can't give you more info as I'm unfamiliar with VVV.

If having a separate sendmail binary (Mailpit's) is still helpful to you, then I can add these for future releases. I'd rather not add anything if it's not necessary though, only if it's helpful. Please just let me know.

<!-- gh-comment-id:1509441195 --> @axllent commented on GitHub (Apr 15, 2023): As explained in [the README](https://github.com/axllent/mailpit#configuring-sendmail), you can use the `mailpit sendmail` command instead of using sendmail directly, is it the equivalent. Alternatively you can symlink sendmail to mailpit and Mailpit will invoke sendmail (`ln -s /usr/sbin/sendmail /path/to/mailpit`). It really depends what exactly you wish to achieve here, and both those options are only helpful if you are running Mailpit on the same machine as the server that is sending the mail (ie: same as the PHP instance). Please note that mailpit's sendmail it is configured by default to relay messages to `localhost:1025` (Mailpit's default port). This can be changed via an environment variable or commandline flag (`--smtp-addr`), however as far as your docker container question goes, you can also map a different port to the docker's port 1025 (so leaving Mailpit to run on its default ports). I don't know your environment is structured, how to plan to connect to it (Docker within vagrant?), or from what, so I can't give you more info as I'm unfamiliar with VVV. If having a separate sendmail binary (Mailpit's) is still helpful to you, then I can add these for future releases. I'd rather not add anything if it's not necessary though, only if it's helpful. Please just let me know.
Author
Owner

@jeromelaurens commented on GitHub (May 3, 2023):

reading this issue, I figured out how to test if it was working, not with the README.
This is not completly related but the README would benefit a lot a section for testing it.
For example :

Testing if mailpit is working with mailpit sendmail command

  1. Create a text file containing the headers and the body of the email, for example, email.txt:

    From: sender@example.com
    To: recipient@example.com
    Subject: Email Subject
    
    This is the body of the email.
    It can contain multiple lines of text.
    
  2. Next, run the following command in the terminal:

    mailpit sendmail -t < email.txt
    

    This command uses the -t flag, which tells sendmail to read the "To", "Cc", and "Bcc" headers from the file to determine the recipients.

  3. Check on the UI : the email should be there

<!-- gh-comment-id:1533416121 --> @jeromelaurens commented on GitHub (May 3, 2023): reading this issue, I figured out how to test if it was working, not with the README. This is not completly related but the README would benefit a lot a section for testing it. For example : ### Testing if mailpit is working with mailpit sendmail command 1. Create a text file containing the headers and the body of the email, for example, `email.txt`: From: sender@example.com To: recipient@example.com Subject: Email Subject This is the body of the email. It can contain multiple lines of text. 2. Next, run the following command in the terminal: mailpit sendmail -t < email.txt This command uses the `-t` flag, which tells `sendmail` to read the "To", "Cc", and "Bcc" headers from the file to determine the recipients. 3. Check on the UI : the email should be there
Author
Owner

@jeromelaurens commented on GitHub (May 3, 2023):

filled an issue for that #105

<!-- gh-comment-id:1533433048 --> @jeromelaurens commented on GitHub (May 3, 2023): filled an issue for that #105
Author
Owner

@axllent commented on GitHub (May 4, 2023):

I have added a new wiki section about configuring sendmail and another section testing Mailpit which should answer these questions.

<!-- gh-comment-id:1534512274 --> @axllent commented on GitHub (May 4, 2023): I have added a new wiki section about [configuring sendmail](https://github.com/axllent/mailpit/wiki/Configuring-sendmail) and another section [testing Mailpit](https://github.com/axllent/mailpit/wiki/Testing-Mailpit) which should answer these questions.
Author
Owner

@msaggiorato commented on GitHub (May 4, 2023):

Thanks, I didn't have the time to get back to this yet.

One of the reasons I opened this issue, is because it was not evident in the wiki / Readme, that the mailpit sendmail command allowed the use of host:port. It's not evident that it supports a few of the arguments of regular sendmail.

Maybe adding that would clear out doubts?

<!-- gh-comment-id:1534546571 --> @msaggiorato commented on GitHub (May 4, 2023): Thanks, I didn't have the time to get back to this yet. One of the reasons I opened this issue, is because it was not evident in the wiki / Readme, that the mailpit sendmail command allowed the use of `host:port`. It's not evident that it supports a few of the arguments of regular sendmail. Maybe adding that would clear out doubts?
Author
Owner

@axllent commented on GitHub (May 4, 2023):

I have added some extra documentation on https://github.com/axllent/mailpit/wiki/Configuring-sendmail which hopefully provides more clarity. I appreciate the feedback, thank you.

<!-- gh-comment-id:1535375534 --> @axllent commented on GitHub (May 4, 2023): I have added some extra documentation on https://github.com/axllent/mailpit/wiki/Configuring-sendmail which hopefully provides more clarity. I appreciate the feedback, thank you.
Author
Owner

@msaggiorato commented on GitHub (May 5, 2023):

It's great! Thanks a lot @axllent !

<!-- gh-comment-id:1536860339 --> @msaggiorato commented on GitHub (May 5, 2023): It's great! Thanks a lot @axllent !
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#58
No description provided.