You are not logged in.

#1 2019-02-21 13:27:20

laegnur
Member
Registered: 2013-07-23
Posts: 10

Lost with Mail Server DNS

Hello

I'm lost trying to figure out how I should proceed to set up my mail server.

In the wiki, I read

Hosting a mail server requires a domain name with an MX record pointing to the domain name of your mail transfer agent. The domain name used as the value of the MX record must map to at least one address record (A, AAAA)

In my case, I have hired the example.com domain. And I want my emails to be jhonsmith@example.com.

Using the portal of my domain provider, I create the DNSs @ and www, with A type, pointing to the IP of my service.

And for creating the MX record, it asks me for a subdomain name, so I put mail. Now I see an A entry for mail pointing to the IP and a mx1 entry, with type MX, pointing to mail.example.com

According to the quote above, I would have a domain, mail.example.com, with the MX record, which would point to the MTA domain, mx1.example.com. And the domain mail.example would have its entry A.
I'm understanding it well?

When configuring postfix, I must assign the domain mail.example.com or the mx1.example.com? Does this mean that my emails would be jhonsmith@mail.example.com or honsmith@mx1.example.com?

Last edited by laegnur (2019-02-21 13:29:24)

Offline

#2 2019-02-21 13:37:38

bugsmanagement
Member
Registered: 2017-04-21
Posts: 201

Re: Lost with Mail Server DNS

Hello there,

laegnur wrote:

... and a mx1 entry, with type MX, pointing to mail.example.com

I'm a bit confused, you have a MX record for your root domain, eg mx1.example.com, with no corresponding A record for mx1.example.com?

Regards

Last edited by bugsmanagement (2019-02-21 13:39:52)

Offline

#3 2019-02-21 14:55:16

laegnur
Member
Registered: 2013-07-23
Posts: 10

Re: Lost with Mail Server DNS

Hello

No, I think that is the problem. My domain provider aren't doing something well when I try to create the MX.

Right now I only have entrys for the A registers pointing to my IP, and a mx1 MX register pointing to an A zone.

If I export the DNSs this was the result (change my domain for example.com and mi ip for 1.1.1.1)

$ORIGIN example.com
$TTL 300
@	300	IN	SOA	example.com.	root.example.com.	(
            2019022128	; serial
            21600		; refresh
            3600		; retry
            604800		; expire
            300 )		; minimum
			IN	A		1.1.1.1


;; NS Records
example.com                                  		IN	NS		ns.myprovider.com.
example.com                                  		IN	NS		ns2.myprovider.com.
example.com                                  		IN	NS		ns3.myprovider.com.
example.com                                  		IN	NS		ns4.myprovider.com.


;; A Records
mail.example.com.                          		IN	A		1.1.1.1
www.example.com.                             		IN	A		1.1.1.1

;; MX Records
mx1.example.com.                             		IN	MX		10 mail.example.com

If I understand corretly, the MX zone must be my root domain pointing to another A entry. Isn't?

example.com.                             		IN	MX		10 mail.example.com

Offline

#4 2019-02-21 15:06:25

bugsmanagement
Member
Registered: 2017-04-21
Posts: 201

Re: Lost with Mail Server DNS

; A Records
mail.example.com.                          		IN	A		1.1.1.1
www.example.com.                             		IN	A		1.1.1.1

I'm assuming you are not actually using 1.1.1.1?

;; MX Records
mx1.example.com.                             		IN	MX		10 mail.example.com

This indicates that any mail bound to mx1.example.com, should contact mail.example.com, eg someone@mx1.example.com.

example.com.                             		IN	MX		10 mail.example.com

If this is the desired outcome, than yes, this is correct, eg mail.example.com will be responsible for mail delivery for example.com. So your postfix hostname will be name accordingly, eg mail.example.com.

This is assuming that you are not intending to use mx{1..4}.example.com domains. You should have a gist what should be done. I find https://mxtoolbox.com/ very handy when you want to verify everything is setup correctly at the DNS level.

Best Regards

Offline

Board footer

Powered by FluxBB