LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-24-2009, 03:30 AM   #1
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Two mail server (accepting / sending) and DNS setup


Hi folks,

we are in the midst of a server move and I'm setting up the mailsystem. Also I setup the PTR record of our mailserver (A.B.C.104) I'm not quite sure if this is enough for all the other mailservers to accept mail. Specially beause the MX record points to a total diffrent IP.
Can any one help me clear up the DNS settings or point out to me what DNS records are needed for a clean mail server?


Here is the DNS records I thought of. Entries with * are allready setup and can not be changed

Code:
in-addr.arpa.C.B.A PTR mailer.com (The mailer sending)

mailer.com       A      A.B.C.120 *      (Webserver the domain points to)
mailer.com       MX 10  B.C.A.D *        (The mailer accepting mails for us)
mailer.com       MX 50  A.B.C.104        (The mailer sending. needed?)
mail.mailer.com  A      A.B.C.104        (Or can we do it like that?)
mailer.com       CNAME  mail.mailer.com  (Alias to get mailing right)

Or do i have to get the party hosting the accepting mailer to setup a PTR record with mailer.com for their IP B.C.A.D (the first mx record above)

Hope I could get my point accross

Cheers Zhjim

Last edited by zhjim; 03-24-2009 at 03:33 AM. Reason: nicen up the dns records
 
Old 03-24-2009, 03:44 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you only need an MX record for servers which are being sent mail externally. if there is no MX record for that domain, then most other MTA's sending you mail will try the A record as a fallback. "mail.mailer.com" is just a subdomain of "mailer.com" and doesn't mean anything in itself. PTR's shouldn't matter at all, It's all about the MX.

Thread moved to Linux - Server as this is not a networking question.
 
Old 03-25-2009, 03:16 AM   #3
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748

Original Poster
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Thanks for the reply which now has me totaly confused

Quote:
Originally Posted by acid_kewpie View Post
you only need an MX record for servers which are being sent mail externally.
Do you mean that the server which accepts mail for the domain needs an MX record? Thats how it is setup right now. But the MX record does not point to the server which sends the mail. Hence the question about the PTR.

I just re read my initial post and think I did not made myself clear.
I need advise on how to setup the DNS records in the right way so other SMTP Server accept our mail. That at least would explain why you say that PTR's shouldn't matter or i just misunderstand every paper about correct mailer DNS setup

So to make things clear.
To receive mail I need an MX record ( if non is found the A record will be used).

But to send mail from our domain I need the correct PTR and everything is fine?
Just as i understand correct mailer behavior the receiving party would to a reverse lookup of the ip (the mail is coming from) and if the answer does not contain the domain the mail stats it's coming from its considerd Spam....


Quote:
Originally Posted by acid_kewpie View Post
Thread moved to Linux - Server as this is not a networking question.
Was'nt quite sure where to put it.
 
Old 03-25-2009, 05:26 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well the PTR is just for good practise in general, not actually required for sending emails. Is the case that some other mail servers will check the PTR to make sure it all looks nice. A more formal setup you might want to follow is the SPF system: http://www.openspf.org/Project_Overview which does work well and used by many other mail servers.
 
Old 03-25-2009, 05:44 AM   #5
Japie
LQ Newbie
 
Registered: Mar 2009
Posts: 27

Rep: Reputation: 16
Quote:
But to send mail from our domain I need the correct PTR and everything is fine?
That's right

Quote:
Well the PTR is just for good practise in general
Not exactly, most well configured mailservers DEMAND an existing PTR record for the delivering mailserver, to prevent spammers with floating IP's.

If you don't have your PTR records set up, lot's of mailservers will bounce or reject your mail

Last edited by Japie; 03-25-2009 at 05:45 AM.
 
Old 03-25-2009, 06:15 AM   #6
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748

Original Poster
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Thanks for the link of SPF. Looks like a good thing.

Sounds like I'm all set then with the right PTR record. Or can you thing of any other good practice DNS settings for sending mails?

Thanks Zhjim
 
Old 03-26-2009, 04:20 AM   #7
Japie
LQ Newbie
 
Registered: Mar 2009
Posts: 27

Rep: Reputation: 16
Not really, you should be good to go.

In general I like to keep my zonefiles easily readible.
this should do the trick

$TTL 1W
@ IN SOA ns.mailer.com email.address.mailer.com (
yearmonthday ; Serial
28800 ; Refresh
1800 ; Retry
604800 ; Expire - 1 week
86400 ) ; Minimum

; ********************************************************************
; Nameserver records
; ********************************************************************
@ NS ns.mailer.com.
NS ns2.mailer.com.

MX 10 mail.mailer.com.
MX 50 mail2.mailer.com.
; **********************************************************************

A a.b.c.120
mail A b.c.a.d
mail2 A a.b.c.104








Keep your PTR records in a separate zonefile, that looks like this :


$TTL 1W
@ IN SOA ns.mailer.com email.address.mailer.com (
yearmonthday ; Serial
28800 ; Refresh
1800 ; Retry
604800 ; Expire - 1 week
86400 ) ; Minimum

; ********************************************************************
; Nameserver records
; ********************************************************************
@ NS ns.mailer.com.
NS ns2.mailer.com.

MX 10 mail.mailer.com.
MX 50 mail2.mailer.com.
; **********************************************************************

a.b.c.120 PTR www.mailer.com.
b.c.a.d PTR mail.mailer.com.
a.b.c.104 PTR mail2.mailer.com.



Have fun !
Regards,
Japie
 
Old 03-27-2009, 02:51 AM   #8
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748

Original Poster
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Thanks for the layout of the zone files, luckily I can set up all the DNS through a webpage so I don't have to fiddle with the files.

Questions answered. Case can be closed

Regards Zhjim
 
Old 04-06-2009, 04:46 AM   #9
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748

Original Poster
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Little addition. Check out this link it gives a nice round up how dns should be set for mailing.

http://bind8nt.meiway.com/itsaDNSmess.cfm
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS server setup and mail server rajivsalwan Linux - General 4 07-15-2006 01:24 AM
Postfix mail server not accepting incoming mail from the external interface rexmundi Linux - Networking 7 12-22-2003 03:41 PM
Setup DNS, WEB, FTP, and Mail Server Help! dcdjservices Linux - Networking 42 08-28-2003 03:57 PM
Setup a linux server, DNS, WEB, FTP, and Mail Server Help watermelon_lee Linux - Networking 1 08-26-2003 03:09 AM
Mail Server not accepting mails!! RKris Linux - Networking 5 08-27-2002 06:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration