Полезная информация

Chapter 17. Electronic Mail

Table of Contents
17.1. Basic Information
17.2. Configuration
17.3. FAQ

Contributed by Bill Lloyd .

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.

17.1. Basic 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.

17.1.1. User program

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.

17.1.2. Mailhost Server Daemon

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.

17.1.3. DNS --- Name Service

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.

17.1.4. POP Servers

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.

  1. Get pop software from the Ports collection that can be found in /usr/ports or packages collection. This handbook section has a complete reference on the Ports system.

  2. Modify /etc/inetd.conf to load the POP server.

The pop program will have instructions with it. Read them.