Author's Opinion

The views in this column are those of the author and do not necessarily reflect the views of iTWire.

Have your say and comment below.

Thursday, 27 January 2011 12:34

Sendmail, an MTA for the ages


Eric Allman is a figure who is highly revered in the tech world; the man who wrote the first mail transport agent to make email a common thing may be a figure of the past but people will queue to even have a glimpse of someone whom they consider a legend.

Allman was at the 12th Australian national Linux conference this morning to deliver the third keynote, which he called "Sendmail Revisited".

He took his audience through the beginnings of Sendmail, setting things in the context of the time at which he created the software, right up to the present.

"Sendmail is more than 30 years old but it has survived well," he said. "It was created without corporate support but has thrived in a rapidly changing world."

Allman (below) started writing the MTA at Berkeley in 1980. He was working on the INGRES relational database management system and had no official support for what he set out to do.
Eric Allman
This was a time when CPUs were 16-bit and less than one MIPS, disks were much smaller than even a gigabyte and the amount of memory on a machine was always below a single megabyte.

"That was a time when cameras used film," Allman said, to chuckles from the gathering of geeks.

The INGRES database management project at Berkeley got a connection to then existing ARPAnet and everyone wanted to use it. This was the setting for Allman to create Delivermail, the precursor to Sendmail.

"I observed that what everyone wanted to do was to use email and my solution was to write software that would forward messages between networks," Allman said. "Routing decisions were based on punctuation characters in addresses."

When it came to design decisions, Allman said he realised that he had to make Delivermail acceptable to the world, not the other way around. "I had to accept that there would be just the one programmer - me," he said. "And I also had to accept that I could not redesign user agents or the local mail/store."

His solution did the job but it created its own share of problems. "It had an inflexible configuration, there was no address translation between networks and address parsing was simplistic and opaque."

The transition to Sendmail came when Berkeley was given a DARPA contract for 4.2BSD. "Bill Joy talked me into it," said Allman.

There were lots of changes required - he had to include SMTP support at a time when the protocol had not been defined, and this forced the creation of queues. "And queues are much harder than they look."

What Allman ended up with was an MTA that did header rewriting, had SMTP support, queuing and runtime configuration.

The years of the UNIX wars followed; Allman left Berkeley in 1981 and, in the years to 1990, most vendors of UNIX systems created their own versions of Sendmail. When Allman returned to Berkeley in 1989, he had to tweak Sendmail to accommodate the university's new computer science subdomain.

The tweaking turned into a major rewrite known as Sendmail 8. Features were taken from other versions as many vendors had created their own extensions, many of which were good. The open source community had done some good work as well.

Sendmail 8 had a major revision of SMTP, supported new protocols, and had more integration with other systems. "That was the time that the Bat book (O'Reilly Press book on Sendmail) came out and it increased uptake dramatically," Allman said. "It taught me the value of good documentation."

At this time, Allman used to get lots of queries about Sendmail and he was answering them on his own time. He decided to start a company to produce a commercial version so he could get back to coding and Sendmail Inc was born, one of the first open source hybrid companies.

The commercial version of Sendmail resulted in several new features - encryption and authentication, milter (filtering), support for virtual hosting and multiple logical queues, and support for LDAP.

Allman spent about half his talk outlining the lessons he had learnt. In many cases, he admitted that he had had taken wrong decisions but they had been right at the time they were taken.

"The good news is that you can do anything with Sendmail. The bad news is also that you can do anything with Sendmail," he said. "It is not a solution but a tool to build a solution. And I would follow that approach even today."

Touching on the configuration file syntax, he said that it was ugly but not fundamentally flawed. "I would probably use something like Apache as my example if I did it today," he said.

Allman said that one thing he had done wrong was extending rather than changing features. "For example, with masquerading, I did it wrong but continued to add features. I didn't want to break existing sites.

"This was wrong and is a huge part of why Sendmail is hard to configure. I should have provided upgrade tools."

However, there were many positive lessons. "The KISS principle actually works," Allman said. "And flexibility trumps performance when the world keeps changing rapidly."

He advised his audience to fix things early -"if you succeed, the install base only gets bigger."

And, remember, he said, documentation is the key to broad acceptance. "That's where many open source projects stumble these days - poor documentation."



26-27 February 2020 | Hilton Brisbane

Connecting the region’s leading data analytics professionals to drive and inspire your future strategy

Leading the data analytics division has never been easy, but now the challenge is on to remain ahead of the competition and reap the massive rewards as a strategic executive.

Do you want to leverage data governance as an enabler?Are you working at driving AI/ML implementation?

Want to stay abreast of data privacy and AI ethics requirements? Are you working hard to push predictive analytics to the limits?

With so much to keep on top of in such a rapidly changing technology space, collaboration is key to success. You don't need to struggle alone, network and share your struggles as well as your tips for success at CDAO Brisbane.

Discover how your peers have tackled the very same issues you face daily. Network with over 140 of your peers and hear from the leading professionals in your industry. Leverage this community of data and analytics enthusiasts to advance your strategy to the next level.

Download the Agenda to find out more


Sam Varghese

website statistics

Sam Varghese has been writing for iTWire since 2006, a year after the site came into existence. For nearly a decade thereafter, he wrote mostly about free and open source software, based on his own use of this genre of software. Since May 2016, he has been writing across many areas of technology. He has been a journalist for nearly 40 years in India (Indian Express and Deccan Herald), the UAE (Khaleej Times) and Australia (Daily Commercial News (now defunct) and The Age). His personal blog is titled Irregular Expression.



Recent Comments