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. A mailserver 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 mailserver will return the mail to the sender. If the mailserver 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 mailserver. This is not only a privacy concern, but can also lead to malfunctions on the mailserver when text files become too lengthy.
Another collection mailserver program is called IMAP (Internet Message Access Protocol). 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 mailserver 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 mailserver, mail does not have to travel through your ISP, providing a degree of privacy. Running your own mailserver 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 mailserver if they sign a contract guaranteeing the mailserver will not be used for spam.