Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

Email & Domain Name

I have registered a domain name e.g. www.abc.com for my server having ip lets say 111.111.111.111 which is running Fedora Core 8

The server is running Apache only. For my website which is hosted on my server I just have to type the domain name in my browser. But my server does NOT contain any mail server and I don't want to run any.
I already have another mail server obviously with a different IP.

I want to send my webpage traffic to my new server (with apache) and mail like (info@abc.com) to the other one.

Please guide me how to do this.

I am quite a beginner so please describe everything in detail.
0
systemsautomation
Asked:
systemsautomation
1 Solution
 
Kamran ArshadIT AssociateCommented:
Hi,

You need to change the MX record of your domain "www.abc.com" to point to your mail server. Say for example your web server has IP address "111.111.111.111" and your mail server has IP address "111.111.111.112". Now you have to edit the zone file of your domain "www.abc.com" and add the below entries:

mail         IN     A       111.111.111.112
IN     MX     10     mail.abc.com.


The above two lines will send all mails to your mail server.
0
 
agriesserCommented:
You need to make sure that the MX record (Mail Exchanger record) of your domain points to your mail server.

Let's say you have the domain abc.com and have two servers, 1.1.1.1 and 1.1.1.2 where 1.1.1.1 is the mail server for your domain and 1.1.1.2 will host the websites.

You will need to have some A records for your servers in place, f.ex.:

web.abc.com 1.1.1.2
www.abc.com 1.1.1.2
mail.abc.com 1.1.1.1

So that you can access these machines with a pretty hostname instead of using the IP-address.

When mail is sent to a domain, the mailserver searches the DNS database for the so called MX record to see which machine handles mail for this domain.
There should be only one MX record for your domain (probably two with different priorities if you want to establish a backup MX) and this MX record should then point to your mail server.

Another important thing is the reverse lookup entry (PTR record).
If mail.abc.com will send mails directly to other mailservers (without using your provider's smarthost) you need to make sure that the IP address 1.1.1.1 resolves back to your domain name.
Some e-mail servres check for valid PTR records before they accept mail from you and if you don't provide such a PTR record you might get blacklisted by them.

You can verify your settings using `nslookup` (either on Linux or on Windows, whatever platform you're running on your desktop).

First, make sure that the A records are in place:

nslookup
www.abc.com
mail.abc.com

The output should look like this then:

# nslookup
> www.abc.com
Server:         yourdns
Address:        yourdns#53

Name:   www.abc.com
Address: 1.1.1.2
>
>
>
> mail.abc.com
Server:         yourdns
Address:        yourdns#53

Non-authoritative answer:
Name:   mail.abc.com
Address: 1.1.1.1
> exit

If you want to check your MX record, use the "set q=MX" command in nslookup like this:

# nslookup
> set q=MX
> abc.com
Server:         yourdns
Address:        yourdns#53

Non-authoritative answer:
abc.com    mail exchanger = 5 mail.abc.com.

Authoritative answers can be found from:
mail.abc.com       internet address = 1.1.1.1


To check the valid PTR record, use "set q=PTR":

# nslookup
> set q=PTR
> 1.1.1.1
Server:         yourdns
Address:        yourdns#53

Non-authoritative answer:
1.1.1.1.in-addr.arpa       name = mail.abc.com.

Authoritative answers can be found from:


I hope that helps you in understanding what's needed, but please note that DNS changes usually take some time to complete because all DNS servers on this planet need to update the information you made on your provider's DNS server, so expect waiting for several hours before you can see the correct values on foreign DNS servers.
0
 
dextermainCommented:
Do you have these server behind a router that has a static ip address , but the Servers (Email and Webserver ) is not internal IP's

If so what type of router do you have, so that I can help you to do the NAT translation.

Regards D ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now