FreeBSD Handbook : Electronic Mail : Configuration : Basic
Previous: Configuration
Next: Mail for your Domain (Network).

17.2.1. Basic

As your FreeBSD system comes "out of the box"[TM], you should be able to send E-mail to external hosts as long as you have /etc/resolv.conf setup or are running a name server. If you want to have mail for your host delivered to your specific host,there are two methods:

- Run a name server ( man -k named ) and have your own domain smallminingco.com

- Get mail delivered to the current DNS name for your host. Ie: dorm6.ahouse.school.edu

No matter what option you choose, to have mail delivered directly to your host, you must be a full Internet host. You must have a permanent IP address. IE: NO dynamic PPP. If you are behind a firewall, the firewall must be passing on smtp traffic to you. From /etc/services

smtp             25/tcp    mail         #Simple Mail Transfer
If you want to receive mail at your host itself, you must make sure that the DNS MX entry points to your host address, or there is no MX entry for your DNS name.

Try this

newbsdbox# hostname
newbsdbox.freebsd.org
newbsdbox# host newbsdbox.freebsd.org
newbsdbox.freebsd.org has address 204.216.27.xx

If that is all that comes out for your machine, mail directory to root@newbsdbox.freebsd.org will work no problems.

If instead, you have this

newbsdbox# host newbsdbox.freebsd.org
newbsdbox.FreeBSD.org has address 204.216.27.xx
newbsdbox.FreeBSD.org mail is handled (pri=10) by freefall.FreeBSD.org
All mail sent to your host directly will end up on freefall, under the same username.

This information is setup in your domain name server. This should be the same host that is listed as your primary nameserver in /etc/resolv.conf

The DNS record that carries mail routing information is the Mail eXchange entry. If no MX entry exists, mail will be delivered directly to the host by way of the Address record.

The MX entry for freefall.freebsd.org at one time.

 freefall                       MX    30   mail.crl.net
 freefall                       MX    40   agora.rdrop.com
 freefall                       HINFO Pentium     FreeBSD
 freefall                       MX    10   freefall.FreeBSD.org
 freefall                       MX    20   who.cdrom.com
 freefall                       A     204.216.27.xx
 freefall                       CNAME www.FreeBSD.org

Freefall has many MX entries. The lowest MX number gets the mail in the end. The others will queue mail temporarily, if freefall is busy or down.

Alternate MX sites should have separate connections to the Internet, to be most useful. An Internet Provider or other friendly site can provide this service.

dig, nslookup, and host are your friends.


FreeBSD Handbook : Electronic Mail : Configuration : Basic
Previous: Configuration
Next: Mail for your Domain (Network).