• Post author:
  • Post category:General


Let us begin with the origins of Mail Transfer Agent before setting foot on to further details. Philip Hazel came up with the script behind Exim in 1995, which was an improved version of the former MTA Smail.

Exim gives a highly configurable environment, dual style, which includes access control list section, routers section, transports section, retry section, rewrite section and authenticators section. So, let us see how this agent operates.

It is all about emails…sending, receiving and ultimate delivery to the user. . ‘Using SMTP (Simple Mail Transfer Protocol), Electronic emails are sent’ is the normal practice. When you take a background view, the mail is initially provided by a mail client(Mail User Agent,MUA) to a Mail Server(Mail Submission Agent,MSA) using SMTP on TCP port 587.Then, the MSA delivers mail to the Mail Transfer Agents like Exim.


But, still the process is not complete. We need to have a look at the message before proceeding to the next level. Exim gives a message id for every message it carries, which is sixteen characters long. This message id is divided into three parts, separated by hyphens, for example, 16VDhn-0001bo-D3. Each part contains a series of letters and digits, normally encoding numbers in base 62. But, in the case of Darwin operating system (Mac OS X) and when Exim is compiled to run under Cygwin, base 36 (avoiding the use of lower case letters) is used instead.

The content of the message id has changed as Exim evolved. Earlier versions relied on the assumption that operating system will not re-use a process id (PID) within one second. On modern operating systems, this assumption is no longer possible, so the algorithm had to be changed. To retain backward compatibility, the format of the message id was retained, which is why the following rules are somewhat eccentric:

• The first six characters of the message id are the time at which the message started to be received, to a granularity of one second.

That is, this field contains the number of seconds since the start of the epoch (the normal Unix way of representing the date and time of day).

• After the first hyphen, the next six characters are the id of the process that received the message.

• There are two different possibilities for the final two characters:

(1) If localhost_number is not set, this value is the fractional part of the time of reception, normally in units of 1/2000 of a second, but for systems that must use base 36 instead of base 62 (because of case-insensitive file systems), the units are 1/1000 of a second.

(2) If localhost_number is set, it is multiplied by 200 (100) and added to the fractional part of the time, which, in this case, is in units of 1/200 (1/100) of a second.

Now, the message and its format is clear. It is time to get the mail.

MTA====>Mail Exchanger(MX)====>MDA===>User

The mail that has reached the MTA asks the aid of Domain Name System (DNS) to look up the mail exchanger record (MX record) for the recipient’s domain. The MTA next connects to the exchange server as an SMTP client.

Once the MX target accepts the incoming message, it hands it to MDA for local mail delivery. Once delivered to the local mail server, the mail is stored for batch retrieval by authenticated mail clients (MUAs). Then using end-user applications based on IMAP or POP, voila, the mail is received at the user end.

Well, approximately 51% of the publicly reachable mail servers on the Internet run Exim as per April 2014 status. Why Exim is so special; is it because its security record has been fairly clean or is it being highly configurable or often handling thousands of emails per hour efficiently. Well, these are some for the record!

Leave a Reply