kumomta
kumomta copied to clipboard
document `sendmail` executable local submission alternative(s) that are compatible with kumomta
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
More Infos about sendmail and php: https://www.php.net/manual/en/mail.configuration.php#ini.sendmail-path
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.
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.
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
I found a useful wrapper: https://github.com/sercxanto/small_scripts/blob/master/sendmail_wrapper.py
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.
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.
I found a stable solution. Called msmtp. More Infos: https://marlam.de/msmtp/msmtp.html
perhaps you can add the hint to the docu.