LWN.net Logo

A comparison of Mail Transfer Agents - Part One

August 23, 2006

This article was contributed by Dan Shearer

For a lot of people the choice of the Mail Transfer Agent is important. The wrong choice can mean lost time and money, lower reliability and increased risk to networks.

Debates over MTAs sometimes last for years, and this article covers the main points that come up over and over. Unfortunately, apart from this article there are no general comparisons of MTA characteristics on the Internet, and even very little benchmarking. The remarks here are personal opinions drawn from readily-verifiable facts and subjective comments drawn from experience. Nearly every MTA has a vociferous and sometimes combative group of supporters, not always including the principal authors of the MTA.

It is easy to see why administrators care about which MTA they use. Large installations require a lot of time spent tuning the MTA, and for any site email is without doubt the most important use of the Internet. End users can get by without a web site or a browser for a little, but without email business stops. And so countless administrators invest time in learning how to tweak their internet mail delivery tool in order to meet their various goals. But which tool should they use when?

Most Internet email seems to be delivered by one of four MTAs:

There are other worthy free MTAs to talk about, such as zmailer and smail3, but since they are not so widely used I decided to omit them. There are some unworthy MTAs too, these I am delighted to omit.

How To Compare MTAs

Each of these four widely-used MTAs have broadly similar features. All of them can handle large amounts of mail; can interact with databases in many formats; have an extensive knowledge of the many SMTP variants in use; are not trivially exploitable; have the source code available in a free manner; have third-party documentation available; and have significant user communities. They even have logos!

There are some assumptions implicit in the rest of this article. If you are looking for a product that presents an administrative interface and performance results similar to Microsoft Exchange or Lotus Notes, this document is not for you. I do not believe either of these products and their aspiring competitors can be classed as MTAs, since they attempt to address dozens or hundreds of other functions besides delivering mail. On the other hand, if you want some guidance for selecting between credible alternatives for an important mail hub, read on.

No MTA can score well in every way of measuring an MTA. The needs of users vary greatly and some criteria are mutually orthogonal. Commonly cited MTA selection criteria are:

  • Ease of administration
  • Security
  • Performance
  • Long-term viability

Design features decide how much each MTA meets these criteria. But since opinions vary widely there are many equally valid different comparisons. Contradictory examples of these features are:

  • single configuration file, so everything is in one place
  • many single-purpose and optional configuration files
  • minimal and careful syntax
  • powerful embedded scripting language
  • maximum code stability
  • source code contributions regularly incorporated
  • minimum possible features added
Just about every mail delivery scenario can be met, in one way or another, by all four MTAs. So there is no one right answer.

The rest of part one of this two-part article series is available here, it presents a detailed look at qmail and Postfix. Part two will be featured on next week's LWN.net development page.


(Log in to post comments)

The sad tale of qmail

Posted Aug 24, 2006 4:55 UTC (Thu) by felixfix (subscriber, #242) [Link]

It had so much promise, but that damned license has hobbled it. I was very happy with it when I switched so many years ago, but it has stagnated and is a mess. One of its problems is the mailing list, full of smug arrogant people whose politest answers are the absolute bare minimum of words to tell which cryptic piece of documentation was not fully read and digested, missing the point that the person asking wants advice, not the barest man pages in existence. They are complete, but only as a reference, with almost no guidance as to why you might want to do something.

I sometimes think qmail's greatest benefit is showing how wonderful the GPL is.

The sad tale of qmail

Posted Aug 24, 2006 5:02 UTC (Thu) by rsidd (subscriber, #2582) [Link]

I agree. qmail revolutionised the world of MTAs and for that we should thank DJB. Today it is a pain: it doesn't even compile without patches.

The sad tale of qmail

Posted Aug 31, 2006 16:46 UTC (Thu) by RussNelson (guest, #27730) [Link]

Only because glibc isn't backwards compatible. Let's point the finger at the party that deserves the blame.

The sad tale of qmail

Posted Aug 24, 2006 16:01 UTC (Thu) by dwheeler (guest, #1216) [Link]

You need to add "license" to the criteria, and qmail shows why. It's a source-viewable, but NOT an open source license.
Here's one view:
http://www.lifewithqmail.org/lwq.html#license

And the problems it causes:
http://www.whirlycott.com/phil/2004/12/16/lovehateqmail/
http://www.fsf.org/licensing/licenses/

I've read some claims that OSI approved this as an OSS license,
but I think that's a false claim. In particular, it's not listed here:
http://opensource.org/licenses/

You can't distributed precompiled binaries, and the source code doesn't even compile any more as-is.

The sad tale of qmail

Posted Aug 24, 2006 17:42 UTC (Thu) by felixfix (subscriber, #242) [Link]

I think you can distribute precompiled binaries as long as they are strictly from the original unpatched sources, which became worthless when the first patch was issued.

The sad tale of qmail

Posted Aug 24, 2006 23:42 UTC (Thu) by cventers (guest, #31465) [Link]

I'm still sticking to my qmail guns out of reliability and familiarity
reasons, but there are two main points of anguish:

1. The licensing issue you describe. It may be free beer and source
available, but it's not free software. Because it requires patches,
Gentoo is the only distro I've seen do it cleanly (they distribute patch
alongside original sources and then Portage glues it together)

2. The source code itself is ugly. Amazingly ugly. Qmail is a *fine*
piece of work - fast, secure and easy to administer. But DJB could use
some better CodingStyle.

The sad tale of qmail

Posted Aug 31, 2006 16:53 UTC (Thu) by RussNelson (guest, #27730) [Link]

Actually, I've gotten quite used to djbc. His library is more sublime than the standard C library. For example, stdC's strchr returns a pointer to the character or a null pointer. This leads to crappy coding like this:
*strchr(ptr,';') = '\0'; /* this string always has a semicolon; */
whereas djbc's str_chr returns an offset from the beginning of the array ALWAYS. If the character has not been found, the offset is to the null character. So this is guaranteed to always work:
ptr[str_chr(ptr,';')] = '\0';

His functions for dynamic string lengths are so easy to use that I've come to hate coding in stdC without them. They eliminate the half of all security problems caused by buffer overruns.

The sad tale of qmail

Posted Aug 31, 2006 16:54 UTC (Thu) by RussNelson (guest, #27730) [Link]

http://qmail.org/netqmail/

A comparison of Mail Transfer Agents - Part One

Posted Aug 24, 2006 16:14 UTC (Thu) by johnkarp (guest, #39285) [Link]

"No MTA can score well in every way of measuring an MTA. The needs of
users vary greatly and some criteria are mutually orthogonal."

Nitpick: I don't think 'orthogonal' means what you think it means. It
means 'independent', not 'opposing'.

A comparison of Mail Transfer Agents - Part One

Posted Aug 25, 2006 12:16 UTC (Fri) by rsidd (subscriber, #2582) [Link]

"Orthogonal" means "at right angles", or "without overlap", as in "the scalar product of two orthogonal vectors is zero". So I don't think the usage here is wrong. I'd interpret it figuratively as saying that you can't completely achieve both aims at the same time.

A comparison of Mail Transfer Agents - Part One

Posted Aug 27, 2006 16:46 UTC (Sun) by dirtyepic (subscriber, #30178) [Link]

Except that's not what it means. If two goals are orthogonal, they are not influenced or dependent on one another. They're mutually exclusive. If they aren't, they are synergistic.

Orthogonality is a system design property which enables the making of complex designs feasible and compact. The aim of an orthogonal design is to guarantee that operations within one of its components neither create nor propagate side-effects to other components. For example a car has orthogonal components and controls, e.g. accelerating the vehicle does not influence anything else but the components involved in the acceleration. On the other hand, a car with non-orthogonal design might have, for example, the acceleration influencing the radio tuning or the display of time. Consequently, this usage is seen to be derived from the use of orthogonal in mathematics; one may project a vector onto a subspace by projecting it onto each member of a set of basis vectors separately and adding the projections if and only if the basis vectors are mutually orthogonal. (wikipedia)

Part of Part One of two

Posted Aug 24, 2006 22:11 UTC (Thu) by bignose (subscriber, #40) [Link]

> The rest of part one of this two-part article series is available [link]here

Boo, hiss. If we're going to have articles at LWN, let's make them entirely readable at LWN please.

> Part two will be featured on next week's LWN.net development page.

If we're splitting the article over multiple parts, let's have it all at one site instead of split over multiple sites please.

Split articles not good

Posted Aug 25, 2006 1:14 UTC (Fri) by cdmiller (subscriber, #2813) [Link]

I second this comment, there are now two different threads of comments for this article, not a good thing.

Part of Part One of two

Posted Aug 25, 2006 16:32 UTC (Fri) by nix (subscriber, #2304) [Link]

The 'here' link links to another LWN page. It's not 'off-site'.

Part of Part One of two

Posted Aug 26, 2006 1:02 UTC (Sat) by bignose (subscriber, #40) [Link]

Indeed, I was wrong. Thanks.

I still think it's a bit strange and confusing to give a big run-up to an article, then say "go here for the rest".

Less confusing would be the usual "Short summary of what is in this article, no more than a paragraph. Follow the Full Story link for more."

Part of Part One of two

Posted Aug 28, 2006 19:52 UTC (Mon) by kreutzm (guest, #4700) [Link]

Yes, I also "vote" for a small intro and entire article linked to, instead half an article on the main page, and the entire on a separate page (with two different streams of comments).

Part of Part One of two

Posted Aug 27, 2006 16:29 UTC (Sun) by dirtyepic (subscriber, #30178) [Link]

Still, hard to read when one is 'off-line'.

Copyright © 2006, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds