Linux / Debian Setting up a mailserver (DNS records)

debiandomain-name-systemimaplinuxsmtp

I have a server running Debian. I installed iRedMail, but now I want to access the mailserver externally (receive and send mails). I have to set up DNS records for that, but I can't seem to figure it out correctly.

Can anyone help?

Thanks.

Currently using iRedMail which installs an SMTP and IMAP server. I created a few e-mail addresses. They can send e-mails internally without any problems. Now I want to take it all externally. All the e-mail addresses on this server should be able to receive e-mails from external addresses (hotmail, gmail etc) but also should be able to send out e-mails to external addresses. I ran the default installation, that's it.

Current records:

localhost.domain.com        A       127.0.0.1
domain.com              A       XXX.XX.XXX.XX
www.domain.com          A       XXX.XX.XXX.XX
ftp.domain.com          A       XXX.XX.XXX.XX
domain.com              TXT         "v=spf1 a mx ip4:XXX.XX.XXX.XX ~all"
domain.com              MX 10   XXX.XX.XXX.XX

Best Answer

Assuming both the IMAP and SMTP server reside on the same IP address, you can create an "A" record to point a name to the IP address, or use a "CNAME" record to create an alias to an existing record.

Assuming the public IP address is 10.8.0.5 an "A" record would look like:

mail.myserver.com A 10.8.0.5

And a "CNAME" record would look like:

myexistinghostname.com    A    10.8.0.5
mail.myserver.com    CNAME    myexistinghostname.com
Related Topic