Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How to publicly register Mail server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
webbruno
n00b
n00b


Joined: 01 May 2010
Posts: 24

PostPosted: Tue Oct 02, 2012 7:41 pm    Post subject: [SOLVED] How to publicly register Mail server Reply with quote

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.

Cheers
_________________
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


Last edited by webbruno on Mon Oct 22, 2012 1:03 am; edited 1 time in total
Back to top
View user's profile Send private message
papahuhn
Guru
Guru


Joined: 06 Sep 2004
Posts: 597

PostPosted: Tue Oct 02, 2012 8:06 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
webbruno
n00b
n00b


Joined: 01 May 2010
Posts: 24

PostPosted: Tue Oct 02, 2012 8:10 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
papahuhn
Guru
Guru


Joined: 06 Sep 2004
Posts: 597

PostPosted: Tue Oct 02, 2012 8:16 pm    Post subject: Reply with quote

Plus the DNS and reverse DNS thingy for mail.zemarestaleiro.com.br.
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
webbruno
n00b
n00b


Joined: 01 May 2010
Posts: 24

PostPosted: Tue Oct 02, 2012 8:18 pm    Post subject: Reply with quote

Yes, my isp already changed my reverse DNS, the changing is going on right now as we speak (since it took from 24 to 48 hours) and my register provider already offer a DNS server so it seems I'm done right?
_________________
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
Back to top
View user's profile Send private message
papahuhn
Guru
Guru


Joined: 06 Sep 2004
Posts: 597

PostPosted: Tue Oct 02, 2012 8:26 pm    Post subject: Reply with quote

Forward DNS is even more important. Currently, mail.zemarestaleiro.com.br points to nothing.
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
webbruno
n00b
n00b


Joined: 01 May 2010
Posts: 24

PostPosted: Tue Oct 02, 2012 8:35 pm    Post subject: Reply with quote

Forward will happen when I change mx.zemarestaleiro.com.br to mail.zemarestaleiro.com.br on my register provider right? My router is already forwarding all trafic from the ssl port to my internal mail server (running on xen)
_________________
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
Back to top
View user's profile Send private message
papahuhn
Guru
Guru


Joined: 06 Sep 2004
Posts: 597

PostPosted: Tue Oct 02, 2012 8:46 pm    Post subject: Reply with quote

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?

Edit: "A record", not "NS record".
_________________
Death by snoo-snoo!


Last edited by papahuhn on Tue Oct 02, 2012 9:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
webbruno
n00b
n00b


Joined: 01 May 2010
Posts: 24

PostPosted: Tue Oct 02, 2012 8:56 pm    Post subject: Reply with quote

Quote:
So your provider needs to set an NS record for mail.zemarestaleiro.com.br


I knew there was something missing! :lol: So, the provider we are talking is the Register provider or my ISP or another provider? (Sorry about the confusion)
_________________
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
Back to top
View user's profile Send private message
papahuhn
Guru
Guru


Joined: 06 Sep 2004
Posts: 597

PostPosted: Tue Oct 02, 2012 9:08 pm    Post subject: Reply with quote

The provider, where you have registered the domain, yes. Please see my correction above. Or, if the nameserver is under different control, you need to change it there.

Edit: It seems that your domain's nameserver (ns1.zemarestaleiro.com.br) is your server itself. Hence, you need to configure the A record yourself.
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2507
Location: UK

PostPosted: Tue Oct 02, 2012 11:08 pm    Post subject: Reply with quote

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".
Back to top
View user's profile Send private message
webbruno
n00b
n00b


Joined: 01 May 2010
Posts: 24

PostPosted: Wed Oct 03, 2012 12:46 am    Post subject: Reply with quote

Thanks for all support I believe I'm almost there! I'll surely send an e-mail for you guys when the server is up and running (In fact I could do that now but it would end up on your spam boxes)

@Papahun

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?

@Ant P.

v=spf1 mx ~all

if my mx host starts with mail should I change it to

v=spf1 mail ~all

?
_________________
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
Back to top
View user's profile Send private message
papahuhn
Guru
Guru


Joined: 06 Sep 2004
Posts: 597

PostPosted: Wed Oct 03, 2012 8:10 am    Post subject: Reply with quote

webbruno wrote:
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!
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2507
Location: UK

PostPosted: Wed Oct 03, 2012 7:11 pm    Post subject: Reply with quote

webbruno wrote:
if my mx host starts with mail should I change it to

v=spf1 mail ~all

?

MX refers to the DNS record type, not the subdomain it's on.
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Wed Oct 03, 2012 10:05 pm    Post subject: Reply with quote

This book was fairly useful in understanding the different
nameserver record types and what job they do, when you
need the different record types, etc:
http://shop.oreilly.com/product/9780596100575.do

Even if you use some other nameserver than bind
(like tinydns), knowing what record types you need when
is explained in detail in the DNS & Bind book.
_________________
TIA
Back to top
View user's profile Send private message
webbruno
n00b
n00b


Joined: 01 May 2010
Posts: 24

PostPosted: Mon Oct 22, 2012 1:05 am    Post subject: Thank you! Reply with quote

Thank you guys for all the info! As of now I have a fully functional and public mail server running smoothly Gentoo! The best linux distro with the best users!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum