Mail: Make The Dragonfly Mail Agent (dma) the default mta
cgit.freebsd.org
cgit.freebsd.org
Nowadays most Linux distros don't install any MTA by default. Which I think is an entirely valid choice, considering home users, laptop warriors etc. that don't run any services (for the external world) on the machine, and setting up even a simple smarthost type configuration requires putting in some config data during the installation process.
You can get a hell of a lot of mileage out of knowing which parts of your system can be swapped out or configured in interesting ways, but these days you're more likely to treat your OS as a dumb binary-runner and let a dozen SaaS do all the interesting stuff instead.
Kinda like people who treat their DB as a dumb datastore and don't actually leverage any interesting or distinctive features of it. I guess it's nice that your system can be ported to almost any datastore without trouble, but... man you'd have saved yourself a lot of time, bugs, and money if you'd just actually leveraged your DB. Seems operating systems are getting the same treatment. Why learn to configure a forwarding log daemon when you can just ship to logstash? Why use email alerts when you have pagerduty and an uptime monitor and just auto-rebuild any instances that error? Why use full-featured filesystems like ZFS, and really take advantage of its capabilities to easily add features that'd otherwise be very difficult or to attain much greater server reliability/uptime if you're gonna store everything on S3 and your instances are ephemeral? But then one wonders, why run an actual full OS in the first place, then, if you're not going to use it at all? And indeed, I gather some are moving away from that, for precisely that reason (e.g. Firecracker, "serverless")
Me, I find myself digging deeper and deeper into letting the OS, system services, and mature daemons solve problems for me, rather than searching Github first thing for whatever half-baked Nodejs "webscale" solution there is, or DIYing something that treats the OS as nothing but a job-runner and socket-provider. But that seems to be dinosaur thinking these days.
When the distros started to expand, being a smarthost was the most common configuration. Today, I agree with you the only reason for any sort of SMTP daemon is for programs to send email - all the users are on Google/Slack.
A correctly-configured MTA on all your servers, and a few email filters on the client side, are basically the old-school version of that.
- Reads aliases from /etc/aliases like the Flying Spaghetti Monster intended.
- Limited (very limited, but good enough for smarthost type usage) spooling support. So if there's a glitch at the moment you're trying to send mail, it's not lost (as DMA doesn't run any daemons, there's a cronjob which checks the outgoing spool and tries to deliver the email).
- Actively maintained, and available in the distro archives.
I use to be a Sendmail consultant.
I've seen things you people won't believe. Open SMTP relays with zero firewall protection. I've watched people use sendmail to get root without a password. I've seen volumes of email lost in time, like bits into /dev/null. Time to patch.
UUCP with qmail and later Postfix was a great way to shove e-mail over these really unreliable connections. The g protocol worked amazingly well over these unreliable connections because it could pick up where it left off, so as long as you could get a few packets through, eventually your (sometimes large) e-mail messages could make it through, even if they had the spend the night trying.
The company kept that architecture well into the 2010s, even when we all had fairly speedy, reliable Internet connections, because it just worked really well. They eventually went to gmail years after I left.
UUCP had it's issues, but it was (and still is) one of the best was to transfer stuff over really bad connections. We worked at a place where we had really remote locations and UUCP stuff worked without much work.
Plus, I learned a ton in writing something to do reports and monitoring of the UUCP connections. Fun times, but I am still scarred Sendmail. Some wounds are pretty deep.
I had recommended they switch to using Taylor UUCP, because it splits the queue directory up into a hierarchy. They said Taylor wasn't mature enough, but I asked Ian Lance Taylor about it and he laughed and said "<THE major commercial UUCP provider> doesn't seem to agree." :-)
I've always heard that Kermit has really great protocols for handling horribly, horribly bad modem connections. I had at times wondered if a kermit UUCP protocol would have been useful.
We did almost all sysadmin expertise in-house, but for this Sendmail, we brought in a consultant.
It was a name I recognized from Usenet, and knowingly meeting a "famous" person was pretty new to me at the time. Turns out he wasn't a Unix graybeard (closer to my young skinny nerd age), and he was working on a Neuroscience PhD, while building/fixing everyone's Sendmail setups.
I didn't know to ask him which discipline was more difficult.
1. https://www.linusakesson.net/programming/sendmail/index.php
I run to the nearest Internet cafe and discovered they're blocking SSH ports. It took quite some time to unblock it, make the changes (it took less than a minute) and pray nobody intercepted my access data and make a mess before I get back. I've never felt so ashamed about my lack of professionalism in my entire life. I literally hated myself for being forced to use a public Internet cafe to configure my server.
https://www.mit.edu/people/eichin/virus/strategies.html:
“Debugging mode has many features, including the ability to send a mail message with a program as the recipient (i.e. the program would run, with all of its input coming from the body of the message).“
I don’t know why that page follows that with “This is inappropriate” /s
Ok, I may be lying, but if the sheer mass of that book was more than sufficient to convince me to never try configuring sendmail.
Or the pain of somebody on the team routinely editing the output files without making the changes on the config files, and never knowing whether it'll work the same when you're done.
I worked in a very Make oriented place. If you need to do any processing on files, which not only includes compiling them, but also pushing them to other servers, and loading them into memory on those servers, that should be done with Make. Because Make makes things :)
Now I'd rather write a Makefile than use whatever language's builder of the week. Make can make things, why do I need anything else?
[1] - https://en.wikipedia.org/wiki/Eric_Allman [2] - https://freebsdfoundation.org/blog/foundation-elects-new-off...
I wonder if there's a name for that general sentiment, and how far back comments on that sort of thing go.
The use of sendmail in FreeBSD isn't exactly a coincidence -- it, too, was developed at Berkeley in the 70s and 80s. And it's probably unsurprising that people meet other people living and working in the same place (grad school).
The currently-supported production versions are 12.3 and 13.1. Which are scheduled to be replaced by 12.4 (Dec'22) and 13.2 (Mar'23).
Let’s respect the software of the past. It’s the past’s software that built today’s software.
Sure, email in 80s was different than in the 90s. The problem with sendmail is that it didn't get replaced when it really wasn't a good fit anymore and instead it got dragged on for extra 30 years.
Here's a nugget from Andrew Lee aka rasengan's past:
https://gauravgiri.com/for-the-record/a.bad.habit.pdf
And his future:
It's always been a horrendously difficult to configure monolith.
Worth remembering that Sendmail was, generally speaking, first. Shoulder of giants and all that.
Later email systems like Postfix and qmail in the 90s had it much easier as they operated in a much simpler ecosystem.
Now (well sometime in the future) I can remove half of my Ansible role for setting up dma on my systems, just skipping disabling sendmail.
I learned about dma here, a great blog btw! https://jpmens.net/2020/03/05/simple-solution-for-outgoing-m...
Seeing this news reminds me of an old quote (which I cannot find a direct reference to at this point):
"There is nothing in human experience when compared to setting up a sendmail config-file which can be considered hard."
Based on this move, I guess this means sendmail haven't really improved much in that regard since, and most people just avoiding it for that reason? I guess... Good riddance, then?
It taught me one important thing; that the elegance and reliability of any program is inversely proportional to the size if the configuration guide.
For more complex use cases - it's kinda obvious that they expect ~everyone to install their favorite MTA and use that.
I'd guess that sendmail is still there because they could never agree on which replacement for it was "the best".
I think local email is dumb in general though.
PS. I use uucico to automate some offline factory processes for 25+ years.
I use FreeBSD for decades and sendmail was my number one and the only choice of MTA all that time. Not only mine, but all others FreeBSD users I know too. I don't get why would something that works excellent should be changed to something that, well, is just a dummy ? I love sendmail. I think I can cook it quite well, and I don't get why I should change my habits. Not changing habits is one of the major reasons I use FreeBSD these days. Otherwise I would switch to Linux long time ago. Now FreeBSD made one more step towards its death.
If someone has prejudice against sendmail adding sendmail_enable="NONE" in rc.conf is easy.
Sendmail is not dead, but its glory days are over. 30 years ago the entire world was running on Sendmail, but this already started shifting 20 years ago, and today Sendmail operates a tiny minority of the world's email servers.
If you want to keep running Sendmail: great! Go for it! But it's just not a sensible default any more. The art of picking defaults is choosing something that will work for most people with a minimal surface for footguns. And Sendmail is clearly not it. I appreciate you don't want to "change your habits" – I usually don't want to either – but FreeBSD does not revolve around you.
Btw if you just used sendmail..always..my condolences.
BTW Bitkeeper user here...well and git because i have to.