A mailserver is a Web server set up to handle email by having two programs installed: a sendmail program and a POP program. POP (Post Office Protocol) collects mail sent to you. Mailservers can be installed on the main Web server, or on a separate server.
The sendmail service allows the mailserver to process outgoing email. If an email address does not exist, the server will return the mail to the sender. If the server has a technical problem while trying to deliver mail and is unsuccessful, the mail might also be returned. In all cases in which mail is returned, it arrives with an explanation or error code. By reading the error code, you can determine why the mail did not reach its destination.
The POP program collects incoming email. As it receives mail, it creates a single text file of accumulated messages for each email address. This text file can grow very large. If the end-user has configured his or her email client to delete mail from the server upon collection, the mailserver's text file is wiped when the mail is collected. Some people, however, store email on the server. This is not only a privacy concern, but can also lead to malfunctions when text files become too lengthy.
Another collection program is called Internet Message Access Protocol (IMAP). IMAP runs Web-based mail services like Yahoo!, Hotmail, and others. If you use a website to collect mail, you are accessing an IMAP mailserver.
Virtually every website domain is bundled with mailserver functionality. Internet Service Providers (ISP) also offer email service and mailserver functions. If the server does not offer built-in content filtering, you can install your own spam filter. Free spam filters are very popular and are available online.
A mailserver program can also be installed locally on your own computer. If you're running a this type of server, mail does not have to travel through your ISP, providing a degree of privacy. Running your own server also ensures you will always be able to send or receive mail, even if your ISP's mailserver is down.
Unfortunately, many people who run personal mailservers use them to send spam. As a result, ISPs commonly forbid it in their Terms of Service contract. However, some ISPs allow users to run a personal server if they sign a contract guaranteeing that it will not be used for spam.