Email Server Setup
(Page 1 of 5 )
Running your own email server gives you a great deal of freedom and control. Michael Swanson explains how.
Running your own email server can grant the owner a significant amount of freedom and experience. It allows you to set up and maintain multiple email accounts and domains with ease and allows for keeping unwanted mail out of your inboxes.
Also, you can create email distribution lists to allow for simple delivery of messages to a predefined list of addresses, or have an unlimited (up to your hard drive size) amount of space to store mail. You also have full control over what types of spam control, virus protection and relay black lists are protecting you email server. You can also determine what types of protocols users can access their email with.
In this article I will assume you are running an email server on a direct Internet broadband connection with a single WAN IP address. I will assume that you have a server set up and understand the basis behind port forwarding and basic networking skills.
In order for other email servers on the Internet to know where to deliver mail for your domain, you must make certain entries in your DNS servers. The most important of these is the MX record. The MX records tell the names or IP addresses of the servers that are allowed to handle email for you domain. You can have multiple records of this type as each one must be assigned a weight or authority that determines the order in which each is contacted to receive mail. A couple examples of MX records from a zone file are:
yourdomain.com MX mail.yourdomain.com 10
yourdomain.com MX 184.108.40.2064 20
In the above examples, there would have to be a corresponding A record to map the mail.atlantisvalley.com sub-domain to the appropriate IP address. In terms of the above example, an email server will take the following steps when trying to deliver mail for your domain.
First, it will look up the MX records associated with your domain (the two lines above) and resolve any domain names that are recorded as mail handlers (in this case the mail.atlantisvalley.com part). It will then attempt to deliver the mail to the listed mail handlers in the order of their weights. In the above case, it will first attempt mail.atlantisvalley.com, and if that server doesnít respond, it will try 220.127.116.114.
This is useful if you have an Internet connection that is inconsistent and you can arrange with another server admin to allow their server to receive email for your domain and hold it until your server comes back online. During the early days of the Internet, this was important because Internet access was inconsistent at best or on-demand only due to the exorbitant cost of bandwidth.
When you set up your own email server, you will most likely want to have your WAN IP as the lowest weighted mail handler, since your email server will be handling the mail for your domain. If possible, it may be a good idea to talk to another email server admin and work out an agreement to list that server as the secondary mail handler for your domain to catch email in the case that your server goes down or your Internet connection drops.
Another good idea is to get your domain listed in the ARPA registration (a.k.a. reverse DNS, that is, a mapping of an IP address to a domain name) for your IP address. Many email servers donít accept mail from server IP addresses without reverse DNS entries that match the domain name the server purports to be representing. This is an anti-spam measure to try to prevent spammers from masquerading their servers as delivering mail from well-known domains. In order to set this up, you must talk to the owner of your IP address block, probably your ISP. Many ISPís will do this for free, with just a simple call to technical support.
More Web Hosting How-Tos Articles
More By Michael Swanson