Preface

Back in 1995, the central computing services at Cambridge University were running a variety of mail transfer agents, including Sendmail, Smail 3, and PP. Some years before, I had converted the systems whose mail I managed from Sendmail to Smail to make it easier to handle the special requirements of the early 1990s in UK academic networking during the transition from a private X.25-based network to the Internet. By 1995, the transition was complete, and it was time to move on.

Up to that time, the Internet had been a pretty friendly place, and there was little need to take many precautions against hostile acts. Most sites ran open mail relays, for example. It was clear, however, that this situation was changing and that new requirements were arising. I had done some modifications to the code of Smail, but by then it was eight-year-old code, written in prestandard C, and originally designed for use in a very different environment that involved a lot of support for UUCP. I therefore decided to see if I could build a new MTA from scratch, taking the basic philosophy of Smail and extending it, but leaving out the UUCP support, which was not needed in our environment. Because I wasn’t exactly sure what the outcome would be, I called it EXperimental Internet Mailer (Exim).

One of my colleagues in Computer Science got wind of what I was doing, begged for an evaluation copy, and promptly put it into service, even before I was running it on my hosts. He started telling others about it, so I began putting releases on an FTP site and answering email about it. The early releases were never “announced”; they just spread by word of mouth. After some time, a UK ISP volunteered to run a web site and mailing list, and it has continued to grow from there. There has been a continuous stream of comments and suggestions, and there are far more facilities in current releases than I ever planned at the start.

Although I make a point of maintaining a comprehensive reference manual, one thing that has been lacking is introductory and tutorial material. I kept hoping that somebody else would write something, but in the end I was asked to write this book. I hope it will make life easier for those who find the reference manual difficult to work with.

Organization of the Book

After a short overview chapter, this book continues with a general introduction to Internet email, because this is a subject that does not seem to be well covered elsewhere. The rest of the book is devoted to explaining how Exim works, and how you can use its configuration to control what it does. Here is a detailed breakdown of the chapters:

Chapter 1

This chapter is a short “executive” summary.

Chapter 2

This chapter is a general introduction to the way email is handled on Internet systems.

Chapter 3

This chapter contains a general overview of the way Exim works, and introduces you to the way it is configured, in particular in regard to the way messages are delivered.

Chapter 4

This chapter continues with more overview material, mostly about topics other than the delivery of messages.

Chapter 5

In this chapter, we return to the subject of message delivery, and show how the configuration can be extended to support additional functionality.

Chapter 6

This is the first of a sequence of chapters that cover Exim’s directors, routers, and transports and their options in detail.

Chapter 7

This chapter covers the directors, which are the components of Exim that determine how local addresses are handled.

Chapter 8

This chapter describes the routers, which are the components of Exim that determine how remote addresses are handled.

Chapter 9

This chapter discusses the transports, which are the components of Exim that actually transport messages.

Chapter 10

This chapter describes the filtering language that is used both by users’ filter files and the system filter.

Chapter 11

This chapter describes the various different kinds of Exim processes, and the data that they share.

Chapter 12

This chapter is concerned with temporary delivery errors, and how Exim handles them.

Chapter 13

Up to this point, the bulk of the book is concerned with delivering messages. This chapter describes the facilities that are available for controlling incoming messages.

Chapter 14

This chapter covers the facilities for rewriting addresses in messages as they pass through Exim.

Chapter 15

This chapter covers a number of topics that are concerned with the transmission and reception of messages using SMTP.

Chapter 16

This is the first of three chapters that go into detail about the three main facilities that provide flexibility in Exim’s configuration. They are all introduced in earlier chapters, but full details begin here.

Chapter 17

This chapter gives all the details about Exim’s string expansion mechanism.

Chapter 18

This chapter provides all the details about the three kinds of lists that can appear in Exim configurations.

Chapter 19

This chapter collects a number of items that do not fit naturally into the other chapters, but are too small to warrant individual chapters of their own.

Chapter 20

This chapter gives details of the options and arguments that are used to control what a call to Exim actually does.

Chapter 21

This chapter discusses a number of topics concerned with administration, and describes the utility programs that are available to help with this, including the Exim monitor, which is an application for displaying information about Exim’s activities in an X window.

Chapter 22

This chapter describes how to build and install Exim from the source distribution.

Appendix A

This appendix is a summary of string expansion items.

Appendix B

This appendix is a full reference description of the regular expressions that are supported by Exim.

Conventions Used in This Book

The following is a list of the typographical conventions used in this book:

Italic

Used for file and directory names, program and command names, host and domain names, email addresses, mail headers, and new terms.

Bold

Used for names of Exim directors, transports, and routers.

Constant Width

Used in examples to show the contents of files or the output from commands, and in the text to mark Exim options or other strings that appear literally in configuration files.

Constant Italic

Used to indicate variable options, keywords, or text that the user is to replace with an actual value.

Constant Bold

Used in examples to show commands or other text that should be typed literally by the user.

Comments and Questions

We have tested and verified the information in this book to the best of our ability, but you may find that features have changed (or even that we have made mistakes!). Please let us know about any errors you find, as well as your suggestions for future editions, by writing to:


O’Reilly & Associates, Inc.
101 Morris Street
Sebastopol, CA 95472
(800) 998-9938 (in the United States or Canada)
(707) 829-0515 (international or local)
(707) 829-0104 (fax)

We have a web page for this book, where we list errata, examples, or any additional information. You can access this page at:


            http://www.oreilly.com/catalog/exim
         

To comment or ask technical questions about this book, send email to:


            
         

For more information about our books, conferences, software, Resource Centers, and the O’Reilly Network, see our web site at:


            http://www.oreilly.com
         

Acknowledgments

I could not have produced Exim without the support and assistance of many people and organizations. There are too many to acknowledge individually, even if I had been organized enough to keep a full list, which, to my regret, I have not done. I hope that I have not made any major omissions in what follows.

For Exim itself, I must first acknowledge my colleagues in Computing Service at the University of Cambridge. The management allowed me to write Exim, and once it appeared, Computing Service has supported its use around the university and elsewhere.

Piete Brooks was brave enough to put the first version into service to handle mail for the Cambridge computer scientists. Piete also implemented the scheme for compiling on multiple operating systems. Piete suggested that an integral filter would be a good thing. Alan Barratt provided the initial code for relay checking. Nigel Metheringham persuaded his employers at that time, Planet Online Ltd., to provide support for an Exim web site and mailing list. Although he no longer works for them, he still manages the site and the mailing lists, and Planet (now called Energis Squared) still provides hardware and network resources. Nigel also provided code for interfacing to the Berkeley DB library, for supporting cdb files, and for delivering to mailboxes in maildir format. Yann Golanski provided the code for the numerical hash function. Steve Clarke did experiments to determine the most efficient way of finding the load average in Linux. Philip Blundell implemented the first support for IPv6 while he was a student at Cambridge. Jason Gunthorpe provided additional IPv6 code for Linux. Stuart Lynne provided the first code for LDAP support; subsequent modifications came from Michael Haardt, Brian Candler, and Barry Pederson. Steve Haslam provided some preliminary code for supporting TLS/SSL. Malcolm Beattie wrote the interface for calling an embedded Perl interpreter. Paul Kelly wrote the original code for calling MySQL, and Petr Čech did the same for PostgreSQL. Jeff Goldberg pointed out that I was using the word “fail” in two different senses in the Exim documentation, and suggested “decline” for one of them. John Horne reads every edition of the reference manual, and picks up my typos and other mistakes. Over the five years since the first Exim release, many other people have sent suggestions for improvements or new features, and fixes for minor problems.

Finally, I must acknowledge my debt to Smail 3, written by Ron Karr, on which I based the first versions of Exim. Though Exim has now changed to become almost unrecognizable, its parentage is still visible.

While writing this book, I have continued to enjoy the support of my colleagues and the Exim community. My wife Judith was not only generally supportive, but also read an early draft as a professional copyeditor, and found many places where I was unclear or inconsistent. Ken Bailey made some useful comments about some of the early chapters. John Horne read an early draft and made suggestions that helped me to put the material into a more accessible order, and then read the book again in a late draft, thereby providing further useful feedback.

My editor at O’Reilly is Andy Oram, whose comments and guidance have had a great effect on the form and shape of the finished book. Andy has prevented me from becoming too obfuscated, and he also stopped me when I was writing too much British English.

Get Exim: The Mail Transfer Agent now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.