A mail server is a computer that serves as an electronic post office for email. Mail exchanged across networks is passed between servers that run specially designed software that is built around agreed-upon, standardized protocols for handling mail messages, the graphics they might contain, and attachment files. Internet Service Providers (ISPs) all have mail servers for handling their clients’ mail messages, sometimes referred to as private mail servers. Some websites also offer public email services, utilizing their own servers.
An email client or email program allows a user to send and receive email by communicating with mail servers. There are many types of email clients with differing features, but they all handle email messages and servers in the same basic way.
When an email message is sent, the email program contacts the author’s ISP mail server to pass it the message. The server is normally named mail.[isp].com, although it might be named after the Send Mail Transfer Protocol, smtp.[isp].com. It scans the message’s imbedded headers for addressing information. These headers are not usually visible in an email client unless the user configures the program to show the headers, but critical information is contained here.
The email message is sent along to the address, which might involve being passed through several routers. The message is actually divided into discreet data packets and reassembled on the receiving end. Routers are computers that receive network data and re-route it through the shortest possible path. Assuming nothing goes wrong, the email will reach its destination within seconds or minutes of being sent.
Once the receiving mail server has the message, it stores it in a virtual mailbox. The mail will stay here until the addressee uses his or her email client to check for new mail. When doing so, the email program contacts the receiving server, sometimes called a POP3 mail server (for Post Office Protocol 3) as in pop3.[isp].com, or simply mail.[isp].com. When the email program asks for mail, it checks for any messages addressed to that user. If found, the server transfers the messages to the client as requested. Those located on public websites work in the same basic manner as ISP mail servers.
Due to large amounts of unsolicited email called spam, some mail servers are configured to block certain sets of IP addresses from which spam has been received. An IP (Internet Protocol) address is a unique numerical address, different from the “reply address,” which is often faked in spam messages. Spam filters, as they are called, can operate at the level of the server and also within an email program that offers such a feature. Email programs can also filter mail into folders as it is received, and will normally send a command to the server to delete collected messages.
Mail servers commonly also have filters that will block users from sending large amounts of duplicate mail messages to multiple addresses in another effort to curb spam. Mailing lists are the exception, and operate with different software that identifies the traffic as legitimate. To get around spam blockers, some people attempt to install mail servers on their own computers. Many ISPs consider this a breach of contract, as often stated in the Terms Of Service agreement. Commercial mail servers also employ virus and trojan filters.