Contributed by Bill Lloyd <firstname.lastname@example.org>.
Electronic Mail configuration is the subject of many System Administration books. If you plan on doing anything beyond setting up one mailhost for your network, you need industrial strength help.
Some parts of E-Mail configuration are controlled in the Domain Name System (DNS). If you are going to run your own own DNS server check out /etc/namedb and man -k named for more information.
These are the major programs involved in an E-Mail exchange. A ``mailhost'' is a server that is responsible for delivering and receiving all email for your host, and possibly your network.
This is a program like elm, pine, mail, or something more sophisticated like a WWW browser. This program will simply pass off all e-mail transactions to the local ``mailhost'' , either by calling sendmail or delivering it over TCP.
Usually this program is sendmail or smail running in the background. Turn it off or change the command line options in /etc/rc.conf (or, prior to FreeBSD 2.2.2, /etc/sysconfig). It is best to leave it on, unless you have a specific reason to want it off. Example: You are building a Firewall.
You should be aware that sendmail is a potential weak link in a secure site. Some versions of sendmail have known security problems.
sendmail does two jobs. It looks after delivering and receiving mail.
If sendmail needs to deliver mail off your site it will look up in the DNS to determine the actual host that will receive mail for the destination.
If it is acting as a delivery agent sendmail will take the message from the local queue and deliver it across the Internet to another sendmail on the receivers computer.
The Domain Name System and its daemon named, contain the database mapping hostname to IP address, and hostname to mailhost. The IP address is specified in an A record. The MX record specifies the mailhost that will receive mail for you. If you do not have a MX record mail for your hostname, the mail will be delivered to your host directly.
Unless you are running your own DNS server, you will not be able to change any information in the DNS yourself. If you are using an Internet Provider, speak to them.
This program gets the mail from your mailbox and gives it to your browser. If you want to run a POP server on your computer, you will need to do 2 things.
The pop program will have instructions with it. Read them.