Linux Mail
Mail messages
RFC822 defines the structure of an internet mail header. A mail message consists of:
- Mail header
- Mail body
They are separated by a blank line. The header contains:
- Source address of the mail
- Destination address of the mail
- Subject line
- Date the mail was sent
The mail process
There are four types of programs used in the process of sending and receiving mail. They are:
- 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.
- MTA - Mail 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.
- LDA - Local delivery agent on the receiving machine receives the mail from its MTA. This program is usually procmail.
- 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.
The user's mailbox resides in "var/spool/mail/username".
Remote mail through ISPs over PPP
Mail delivered through an internet service provider (ISP) gets delivered to a mailbox on an ISP server machine. A remote mail protocol is used to support this type of mail. This is necessary because for the mail to get delivered, it must first go to a server machine at an ISP rather than directly to the receiving machine. There are two types of remote mail protocol.
- POP3 (RFC 1939) - Currently most used.
- IMAP (RFC 2060) - More powerful
A remote mail client program is required to use the POP3 or IMAP protocol for mail. Client capabilities are built into some MUA programs When you are using client POP mail services, you must poll the mail service to check for new mail. Most Linux versions come with the fetchmail program which will get your mail from the main mail server and put it into your mailbox on your local machine. Fetchmail will periodically poll your main mail server so you won't need to do int manually. Of course the mail transfer agent software such as sendmail must be set up in order to do this. To connect to remote mailboxes or mail servers, your system will need to support TCP/IP, uucp and/or serial connection ability such as PPP. This is dependant on the mechanism your system will use to connect to mail services.
Mailbox Formats
- mbox - Mailbox format, puts each mailbox into a directory of files.
- BABYL - An old mail system.
- MMDF - The simplest. Older and crude.
- MH - Mailbox format, puts each mailbox into a directory of files.
- qmail
MUAs
- Mutt - Similar to elm but with more commands and more configuration options.
- Elm - A simple mail program. Metamail must be installed for elm to read MIME mail.
- Mailx -
- pine - Supports IMAP remote mail and is liked for new users.
- metamail - Allows MIME support
- mh - Mail handler.
- deliver - file/process mail based on rules
- procmail - file/process mail based on rules
- majordomo - manages e-mail lists
- mserv - provide files-by-mail
- Netscape - Has POP3 and IMAP remote mail capability. Not highly recommended to be a MUA since that is not its speciality.
- smail - Compose mail inside an emacs environment. There's a MTA also called smail. Don't confuse them.
- rmail - Converts the mail inbox into BABYL format. Not recommended.
- mush - Mail users shell for filtering and batch processing.
MTAs
- qmail - It has high security, high speed, and ease of configuration.
- sendmail - Sendmail is complicated for beginners but may not be very fast or secure.
- smail - Smail is simpler than sendmail. It has good security. It is less efficient than sendmail when traffic volume is high.
- exim - Has more features than smail, can block spam, and has reasonable security.
- vmail
LDAs
Other Mail Programs
- Fetchmail - Used to retrieve mail from the ISP mail server.
- biff - Allows the comsat service to be turned on and off.
- comsat - Notifies the user of new mail.
|