wiki/help/server/EmailDns.md

74 lines
3.2 KiB
Markdown
Raw Normal View History

# Configuring DNS (poste.io)
One of the best features of poste.io is that it helps you set up your DNS in the best possible way to avoid having emails delivered to your SPAM folder.
All values are suggested, not required, and may not be best for your configuration, but should work as intended in most cases.
## Server DNS
Log to administration: Server status → DNS diagnostics
### PTR record
The first thing you need to know is what domain you are going to use for your mail server. I strongly recommend mail.your-domain.com as it looks like a proper name for an email server, not something like ip-87-45.isp.com which will most likely end up in the spam folder. You will probably not be able to change the PTR record (known as reverse DNS) yourself, so contact your server provider to change the PTR record of your server's IP address to mail.your-domain.com.
### A and CNAME records
```text
mail.your-domain.com A → 1.2.3.4 (your ip)
```
for some clients you can optionaly setup:
```text
smtp.your-domain.com CNAME mail.your-domain.com
pop.your-domain.com CNAME mail.your-domain.com
imap.your-domain.com CNAME mail.your-domain.com
```
Refresh the DNS diagnostics page and all checks should be green. However, poste.io will still not be able to receive and send emails properly - we need to set up the delivery domain as well.
## Domain DNS
After installing the mail server, the default domain will be installed. Go to Virtual domains → your-domain.com
### MX for your domain
```text
your-domain.com MX mail.your-domain.com
```
### DKIM key
Clicking on "create a new key" will instantly generate new key dedicated for your domain. All outgoing mail will now be signed with the DKIM key.
### DNS DKIM, SPF, DMARC...
Click on "DNS diagnostics"
#### SPF record:
```text
your-domain.com. IN TXT "v=spf1 mx ~all"
```
This literally means to pass all emails from the domain's mail server IP and soft-fail in other cases. An explanation of the options can be found at https://poste.io/spf?gmail.com
#### DKIM record (this is example only, copy one from your administration!):
```text
_s20160910378._domainkey.your-domain.com IN TXT "k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0FvkMuwN46vvtQCC1JZz7XzRE+l+Lf8/5XUKwWJXOcE7dJoZBbOE0Gz85phZ2q+y4l8D7t/hXDz9q+6/KVQDgJ9muaxSM/uS+KG0ds0QLEiV0GYCVu+ZZQSNPBPjOwlDvo3LraW00lMpd5dUj+xpr07ShfIoULhi7/7t76n5GZMse9yBa4hIhxSG/wCAB4D6IWYBURz9Pc75IDPDTlImr3TP/82YrsULY70CHaPHA1+j1VPA5lE+tnmeqxJW6P537xSutDppv8BZg4nlF3ojg2k6LB/cq15C4QRPAMs77pRA4GVnys1LEJ3JDvV3/csOCZ49oC4m44/TnWXk057OAwIDAQAB"
```
Public part of DKIM. You must set the selector (subdomain part) and TXT record exactly the same or it will not work.
#### DMARC record:
```text
_dmarc.our-domain.com. IN TXT "v=DMARC1; p=none; rua=mailto:dmarc-reports@our-domain.com"
```
DMARC is not required, but it is a very helpful method of identifying delivery issues. An explanation of DMARC options can be found at https://poste.io/dmarc?gmail.com
autoconfig records are not required, but help some clients with initial configuration
If all the checks are green now, your mail server is ready to receive and deliver your emails! Now go and create your personal mailbox.
[source](https://poste.io/doc/configuring-dns)