Skip to content
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

Postfix/sendmail replacement #126

Open
jmber opened this issue Jan 26, 2024 · 8 comments
Open

Postfix/sendmail replacement #126

jmber opened this issue Jan 26, 2024 · 8 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jmber
Copy link

jmber commented Jan 26, 2024

What Operating System are you seeing this problem on?

Ubuntu 20.04

What Hardware is this system running?

AMD EPYC

KumoMTA version

2023.12.28-63cde9c7

Did you try the latest release to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version that I tried

Describe the bug

Hi,
we want to replace our servers from postfix to kumo. But there is an importing missing feature.
PHP mail Function is using under Linux the "sendmail" command to send mails to the local mta.

How it is possible to tell sendmail to use kumo?

To Reproduce

No response

Configuration

default

Expected Behavior

No response

Anything else?

No response

@jmber jmber added the bug Something isn't working label Jan 26, 2024
@jmber
Copy link
Author

jmber commented Jan 26, 2024

More Infos about sendmail and php:
https://www.php.net/manual/en/mail.configuration.php#ini.sendmail-path

@wez
Copy link
Collaborator

wez commented Jan 26, 2024

We intentionally do not provide a drop-in replacement for the sendmail command.

Injection of mail from the local system can be achieved using other tools that speak SMTP (we like Swaks for ad-hoc CLI injection), or, if you are willing to write a little bit of code, that speak our HTTP REST Injection API.

For PHP, I do not recommend using the mail function if you are operating at any kind of scale. Instead, I would suggest looking at libraries such as PHPMailer and configuring them to talk to the local SMTP port.

@wez wez removed the bug Something isn't working label Jan 26, 2024
@tommairs
Copy link
Collaborator

Is it fair to assume that what you really want to do is use KumoMTA to send email from PHP? If so, Wez's suggestion above to use PHPMailer is a very good one. if not, please expand on your question.

@jmber
Copy link
Author

jmber commented Jan 29, 2024

Hi, we want to replace postfix by KumoMTA for our server infrastructure. PHP was only an example for the need of sendmail wrapper. We have no influence on the PHP scripts, so the mail() feature cannot be replaced by libraries.
cronjob daemon also uses sendmail to send systemmails

@jmber
Copy link
Author

jmber commented Jan 29, 2024

@tommairs
Copy link
Collaborator

That really just adds a processing layer that eventually just calls the Python SMTP library instead of the PHP one.
It sounds like what you want is the ability to redirect a sendmail call to use KumoMTA with the same parameters instead.

@wez
Copy link
Collaborator

wez commented Jan 29, 2024

I found a much simpler alternative to that wrapper in https://stackoverflow.com/a/43146560/149111

Building out a full-fledged drop-in replacement for the sendmail executable isn't on our roadmap at this time.
We could be influenced by sponsorship to build it out, but given that it is relatively straightforward to script this functionality, I suspect most folks will look at scripting it for themselves.

@wez wez added the Needs Funding This feature is available for sponsorship. label Jan 29, 2024
@jmber
Copy link
Author

jmber commented Jan 30, 2024

I found a stable solution. Called msmtp.
More Infos: https://marlam.de/msmtp/msmtp.html

perhaps you can add the hint to the docu.

@MHillyer MHillyer added the documentation Improvements or additions to documentation label Mar 21, 2024
@MHillyer MHillyer self-assigned this Mar 21, 2024
@MHillyer MHillyer removed the Needs Funding This feature is available for sponsorship. label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Todo
Development

No branches or pull requests

4 participants