Chapter 24 . (Post office web site) Running a Mail Server 621
Chapter 24 . Running a Mail Server 621 Once you have your A record, you can direct mail to your server using an MX (Mail eXchanger) record. The domain for the A and MX records do not need to be part of the same domain, which allows for much greater flexibility. Here is a sample MX record: widgets.test. IN MX 0 bigserver.example.org. This MX record indicates that mail for (any address)@widgets.test should be sent through the server bigserver.example.org. The 0 indicates the numeric priority for this MX record. When more than one MX record exists for a given label, the MX with the lowest priority is tried first. If a temporary error is encountered, the next highest priority mail server is tried, and so on until the list is exhausted. At that point the sending server will keep trying periodically until the message times out (generally five days). If multiple MX records exist with the same priority, they are tried in a random order. Most mail servers will also fall back on the IP address listed in the A record for a label in the event that no MX records exist. However, it is considered bad practice to rely on this. In some cases, it may be complicated to establish an A record because your IP address frequently changes. Obviously, this is not suitable for commercial purposes, but there is a workaround that is acceptably reliable for personal use. This is achieved through dynamic DNS services that are available (often at no charge) through a number of different companies. A list of these companies is maintained at http:// dmoz.org/Computers/Software/Internet/Servers/Address_Management/ Dynamic_DNS_Services/. Three of the most popular (in no particular order) are: . DynDNS.org (http://dyndns.org/), supported by the ddclient or ipcheck packages . ZoneEdit (http://zonedit.com/), supported by the ez-ipupdate package . No-IP (http://no-ip.com/), supported by the no-ip package The ez-ipupdate package supports all three of these, plus a number of others. View the package description (apt-cache search ez-ipupdate) for more information. Most of these services will provide you with a hostname under a shared domain at no charge and can also provide a similar service for your own domain for a reasonable fee. Configuring for Retrieval from a Mail Host The configuration requirements when retrieving mail from a mail host are pretty limited. Your server should be ready to accept mail addressed to localhost and should generally have a name that is unique to it. In the event that a message sent to one of your mailboxes is rejected, the server will need to have a valid host name by which to identify itself when sending out the DSN (Delivery Status Notification). Note Note
In case you need quality webspace to host and run your web applications, try our personal web hosting services.