« When was that again? | Main | Note to self: configuration files »

Who broke the mail server?

It never fails to astound me how such a simple thing as email can be so immensely complicated to configure.

Yes, it’s simple; you can, in many cases, make a direct connection to the recipient’s mail server and type your message in directly, with only a basic grasp of the specifications. (That’s why they call it the “Simple Mail Transfer Protocol.”)

Yes, it’s amazingly complicated, in a way that makes a secure web server look easy. I broke the SMTP daemon on our web server on Friday, which, fortunately, is not the primary mail server for our domain. In fact, I was trying to configure it as a secondary mail server, so if the primary goes down for whatever reason, this box (which is geographically removed, being in Springfield, and closer to the network backbone) will accept our incoming email and store it until the primary server comes back on line. Our ISP is performing this function now, but our ISP is an ISP and therefore conservative (read: careful) in their spam filtering. I’d like to have control of both mail servers for the domain, so I can impose my draconian anti-spam policy domain-wide, and close the secondary loophole.

Anyway… it’s complex. You have to configure the daemon to understand what’s to be delivered locally and what’s to be stored and forwarded. (Which domains and sub-domains fall in each category?) You have to specify the locations of any number of maps, which I don’t wholly understand. And you have to couple this with some DNS tweaking, which I will have our ISP’s network guru handle. If you break it, you get looping mail (which can get bad pretty quickly with a powerful—or bored—machine) or just no mail at all.

As proof of how weird this all is, consider the available software for smtpd (also known as MTAs, or Mail Transfer Agents.) (I’m not mentioning package names here because I don’t want to come up in Google searches for help; those must be common and I doubt I’d be helpful.) The most widely used smtpd is, well, widely used, but often criticized for a dense and impenetrable configuration syntax. I concur; it’s a series of incantations and magic spells which often involve (as my father says,) “holding your mouth right.” The one distributed with Red Hat Linux, which I have successfully configured from scratch before, was intended to remedy this, to the point that it even includes “fix” in its name. However, the help page begins like this:

[It] has several hundred configuration parameters that are controlled via the main.cf file. Fortunately, all parameters have sensible default values. In many cases, you need to configure only two or three parameters before you can start to play with the mail system. Here’s a quick introduction to the syntax…

Um, several hundred? (Fitting that the home page opens with the Frederick Brooks quote, “All programmers are optimists.”)

Meanwhile, a third widely used program includes this qualification early on its home page (where “it” refers to the home page, not the software):

It’s not designed to be easy to use—it’s designed to be comprehensive. There are things in here which have sharp edges!

Is it any wonder that I’m writing here rather than reading documentation?

Now playing: One More Song The Radio Won’t Like from Failer by Kathleen Edwards

Comments

Agreed. Sendmail sucks. I’ve replaced sendmail with postfix on most of my servers. Less cryptic to config, and a lot more secure.

Post a comment