Simple Mail Transfer Protocol (SMTP)

Simple Mail Transfer Protocol (SMTP) is used to send mail across the internet. There are four types of programs used in the process of sending and receiving mail. They are:

  1. MUA – Mail users agent. This is the program a user will use to type e-mail. It usually incorporates an editor for support. The user types the mail and it is passed to the sending MTA.
  2. MTA – Message transfer agent is used to pass mail from the sending machine to the receiving machine. There is a MTA program running on both the sending and receiving machine. Sendmail is a MTA.
  3. LDA – Local delivery agent on the receiving machine receives the mail from its MTA. This program is usually procmail.
  4. Mail notifier – This program notifies the recipient that they have mail. Normally this requires two programs, biff and comsat. Biff allows the administrator or user to turn on comsat service.

The MTA on both machines use the network SMTP (simple mail transfer protocol) to pass mail between them, usually on port 25.

Other components of mail service include:

  • Directory services – A list of users on a system. Microsoft provides a Global Address List and a Personal Address Book.
  • Post Office – This is where the messages are stored.

Mail Protocols

  • SMTP – Simple Mail Transport Protocol is used on the internet, it is not a transport layer protocol but is an application layer protocol.
  • POP3 – Post Office Protocol version 3 is used by clients to access an internet mail server to get mail. It is not a transport layer protocol.
  • IMAP4 – Internet Mail Access Protocol version 4 is the replacement for POP3.
  • MIME – Multipurpose Internet Mail Extension is the protocol that defines the way files are attached to SMTP messages.
  • X.400 – International Telecommunication Union standard defines transfer protocols for sending mail between mail servers.
  • MHS – Message Handling Service by Novell is used for mail on Netware networks.

Directory Services

  • Lightweight Directory Access Protocol (LDAP)
  • X.500 – This is a recommendation outlining how an organization can share objects and names on a

large network. It is hierarchical similar to DNS, defining domains consisting of organizations, divisions, departments, and workgroups. The domains provide information about the users and available resources on that domain, This X.500 system is like a directory. Its recommendation comes from the International Telegraph and Telephone Consultative Committee (CCITT)

Mail API

Mail application programming interfaces (APIs) allow e-mail support to be integrated into application programs.

  • MAPI – Microsoft’s Messaging API which is incorporated throughout Microsoft’s office products supports mail at the application level
  • VIM – Vendor-Independent Messaging protocol from Lotus is supported by many vendors exclusive of Microsoft.

Three parts of a mail message:

1. Envelope – Includes recipient and sender addresses using the MAIL and RCPT commands.

2. Headers – Each header has a name followed by a colon and its value. Some headers are From, Date, Reply To, Received, Message ID, To, and Subject.

3. Body – The contents of the message sent in 7 bit ASCII code.

SMTP Commands:

  • HELO – Sent by client with domain name such as mymachine.mycompany.com.
  • MAIL – From <myself@mymachine.mycompany.com>
  • RCPT – To <myfriend@theirmachine.theirorg.org>
  • DATA – Sends the contents of the message. The headers are sent, then a blank line, then the message body is sent. A line with “.” and no other characters indicates the end of the message.
  • QUIT

If you recall from the DNS section mail servers are specified in DNS configuration files as follows:

dept1.mycompany.com. IN MX 5  mail.mycompany.com.

dept1.mycompany.com. IN MX 10 mail1.mycompany.com.

dept1.mycompany.com. IN MX 15 mail2.mycompany.com.

The host dept1.mycompany.com may not be directly connected to the internet or network but may be connected periodically using a PPP line. The servers mail, mail1, and mail2 are used as mail forwarders to send mail to the host dept1. The one with the lowest number, 5, is normally used for sending the mail, but the others are used when the first one or ones are down.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top