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.zemarestaleiro.com.br mail zemarestaleiro.com.br

::1 mail.zemarestaleiro.com.br mail zemarestaleiro.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.

A public mailserver needs to be publicly announced. The current active MX record for your domain zemarestaleiro.com.br is mx.zemarestaleiro.com.br, which points to 200.234.222.116. However, the MX record has to point to your Postfix server IP (presumably 187.45.210.115 itself?). Ask your domain hoster if he can change the MX record or update the NS record for mx.zemarestaleiro.com.br._________________Death by snoo-snoo!

Yes, currently we are hosting our mail server elsewhere, so all I have to do is to change the mx to mail.zemarestaleiro.com.br and fill my ip on my register provider? Very straight forward! Thank you for the answer_________________Running Gentoo with =sys-kernel/vanilla-sources-2.6.39 from i5 2500k @ 4.0ghz, 8gb ddr3 1866 corsair vengeance, ga-ud3-p67-b3, seagate barracuda 1TB 32mb cache, cooler master 460 and Geforce GTX 580

It's not about packet forwarding. "mail.zemarestaleiro.com.br" needs to point to the Postfix server's IP address. So your provider needs to set an A record for mail.zemarestaleiro.com.br. This is an additional task besides the reverse DNS and MX change. And why are you mentioning SSL here?

You should also set up SPF for the domain if you're sending outgoing email. This makes other servers automatically reject spam with a fake address from your domain that aren't sent from your mailserver's IP:

Add a MX record pointing to the mailserver's IP, then add a TXT record containing "v=spf1 mx ~all".

Yes, I will have to change this IP that starts with 187 to my current IP, but what about the ns1 and ns2 servers? Is there any configuration on gentoo I should change?

ns1 points to your server itself (187...115) , so it's in your hand to add the A record for mail.zemarestaleiro.com.br. ns2 is a different address (...104), so you have to change that somewhere else._________________Death by snoo-snoo!