Registering publicly Mail server and Web server in a free dns server

I’m trying to host the e-mails and the site of our company into our private server. I’ve already followed the Gentoo Virtual Mailhosting System with Postfix Guide and my mail server is working (actually it sends mails for the local users and for external users it goes to spam) and know how to set an Apache 2 server. What I don’t know (and I mean really don’t) is how to make them public.

I did some research and found that I should ask my ISP to change the reverse DNS to my company domain in order to prevent my mails to be marked as spam, they are doing.

I already know I have to configure a DNS Server, it seems like my register provider already has one but I don’t know how I can configure CNET, A, MX, TXT and all those tags (Is it tags the name?) and If I must do some other configuration on my server.

My Server:

Linux mail 3.2.21-gentoo #1 SMP

My /etc/hosts:

127.0.0.1 mail.example.com.br example example.com.br

::1 mail.example.com.br mail example.com.br

My /etc/conf.d/hostname:

hostname =”mail”

What am I missing? If there’s a guide about how to configure I would really be grate. Thanks in advance for the help.

Cheers

Answer

You will most likely be using the DNS servers at your registrar or hosting provider.

The records you need to setup for email are:

mail.example.com. IN A  <public ip address of mail server>
example.com. IN MX  10  mail.example.com

If your provider does it via a website interface, the first part is the hostname to enter, the middle part the type of record (A or MX), the 10 is priority, and the last part is the value to enter. Some providers don’t want the period at the end of the hostname, other’s do.

I strongly recommend getting a book on DNS, it’s a large topic that takes a bit of effort to understand properly.

Attribution
Source : Link , Question Author : Bruno Vieira , Answer Author : Grant

Leave a Comment