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: 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.


  • 1
    "Is it tags the name" - No, they are called dns RECORDS. And there are actually entire books devoted to just DNS. It's a fairly in depth thing that can't easily be covered here.
    – Grant
    Oct 2, 2012 at 19:44
  • Thanks for the enlightenment. I'll look forward to a more depth way of learning. I It seems that is a very serious sin to admit you don't know anything and then ask in a Q&A site. Oct 2, 2012 at 19:47
  • It's certainly not a sin. Nobody knows everything, and DNS is hard to get your head around. But broad questions sometimes aren't a good fit for this site's Q&A style.
    – Grant
    Oct 2, 2012 at 19:49

2 Answers 2


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.

  • Yes, my Register provider offers a DNS service. I didn't make myself clear enough I must admit. But I was trying to ask if I should configure something in my server to conform to the DNS Records (Thank you for the right name) and if I had free options as dns servers. So All I must do is fill my register provider form. Simple enough Oct 2, 2012 at 19:51
  • Make sure postfix is configured to use mail.example.com as it's hostname, and example.com as it's domain. There are several websites that will run some simple checks to point out anything that isn't configured properly. mxtoolbox.com is one I've used before, but there are others as well.
    – Grant
    Oct 2, 2012 at 20:01
  • myhostname = mail.example.com.br and mydomain = example.com.br are already set for the right host and domain on my main.cf file. Thanks really for all the help. I gonna give mxtoolbox.com a try Oct 2, 2012 at 20:05

What you're asking is can't be explained here (or at least not that simple), it requires a lot more information from you to get it where it should. I can provide you with some consulting and get that going...


  1. open browser
  2. type in www.google.com
  3. gentoo bind

first result will provide you with some guidance.

  • Well, you could point me a guide for example... Oct 2, 2012 at 19:29
  • www.google.com is the best guide there is) or do you want me to google it for you?
    – alexus
    Oct 2, 2012 at 19:31
  • What in the world made you think I didn't tried that? I know it's common on Q&A sites that users come without previous research but that's not the case. Check my last question, I'm struggling with this topic for a month now Oct 2, 2012 at 19:33
  • -1; Wow, that's a very helpful answer.
    – Bryan
    Oct 2, 2012 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.