I’m looking for a simple sendmail replacement to receive local mail, such as from cron and service failures and forward it to on to a real SMTP server.
I have used msmtpd
successfully but thought I’d ask if folks have other solutions they like.
If your real SMTP server is doing fine, nullmailer is possibly the simplest of all smtp relay packages available.
You want an SMTP relay. You can use a free public SMTP relay, or make one yourself with something like Postfix. If you make one yourself, don’t keep it open, or spammers will abuse it. If you’re sending mail properly, you’ll need to add it to your SPF entry in your DNS. If you’re just sending mail for yourself, you should be able to set up a filter in your email provider so that it doesn’t get rejected.
You also need to know if outbound traffic is blocked on port 25 by your ISP. Most ISPs block it to prevent spam. If yours is blocked, you can request that they unblock it, but they might not do it. If they don’t, you’re kind of SOL. At that point, you need an account somewhere to send mail through. Then you’d be connecting on port 587 to submit mail.
I have an SMTP server. I need a sendmail binary that does one thing well: send the message to the SMTP server.
Can’t you use sendmail? Also, check out my updated message above. You’ll need to make sure you can send outbound traffic on port 25.
Sendmail is a binary provided by a mail system and no mail system is installed by default on Fedora.
I’m looking for a solution that’s as simple as possible: provide a sendmail binary to pass the message to a third-party SMTP server.
I’ll connect to Mailgun via TLS— no port 25 involved.
Sendmail is provided by the
sendmail
package in Fedora. Here’s some instructions on installing and configuring it:https://tecadmin.net/install-sendmail-on-fedora/
But you might instead be looking for an SMTP client (or a Mail User Agent), which is different:
https://www.baeldung.com/linux/send-emails-from-terminal
If you have SMTP credentials with Mailgun, and you’re using port 465 or 587, you want an MUA, not an MTA (Mail Transfer Agent).
Sendmail can be both, but there are better tools if you’re looking for an SMTP client.
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:
Fewer Letters More Letters DNS Domain Name Service/System IP Internet Protocol SMTP Simple Mail Transfer Protocol SSL Secure Sockets Layer, for transparent encryption TLS Transport Layer Security, supersedes SSL
[Thread #679 for this sub, first seen 15th Apr 2024, 00:35] [FAQ] [Full list] [Contact] [Source code]
ssmtp is what I’ve used before.
@atzanteol @markstos@lemmy.world
ssmtp is unmaintained.
msmtp is the recommended successor. The Arch wiki recommends also considering OpenSMTPD, which I haven’t looked at yet.
Deliverability is hard no matter what software you use. You have to spend a while warming your IP addresses. This is one thing I’d call a hassle to self host. I’ve been using mxroute.com which is diy friendly and cheap.
Postfix.
I use proxmox mail gateway (PMG) for my homelab, configured to relay through my Gmail domain using smtp auth.
I’ve also used PMG at the enterprise level. Never had an issue with it.
It’s postfix underneath.
I run Mailcow-dockerized for my mail server and internal relay, and it’s a postfix based system. Never have any issues with it.
Use a postfix satellite setup. Requires minimal config and provides queues/retries/etc.
Tried that. Yes, it has the feature I need. But it has a rather complex feature set and documentation when I just need to to send my mail to an SMTP server. I ran into problems configuring it for this in the past which were difficult to diagnose due to the volume of config options and docs. That’s what led me to explore tools that had only the features I needed and no more, like msmtp or nullmailer.