|
| 1 | +.. |nbsp| unicode:: 0xA0 |
| 2 | + :trim: |
| 3 | + |
1 | 4 | ============================================ |
2 | 5 | Configure DNS records to send emails in Odoo |
3 | 6 | ============================================ |
@@ -64,32 +67,109 @@ DKIM (DomainKeys Identified Mail) |
64 | 67 |
|
65 | 68 | The DomainKeys Identified Mail (DKIM) allows a user to authenticate emails with a digital signature. |
66 | 69 |
|
67 | | -When sending an email, the Odoo email server includes a unique :abbr:`DKIM (DomainKeys Identified |
68 | | -Mail)` signature in the headers. The recipient's server decrypts this signature using the DKIM |
69 | | -record in the database's domain name. If the signature and the key contained in the record match, it |
70 | | -proves the message is authentic and has not been altered during transport. |
| 70 | +When sending an email, the Odoo email server includes a unique DKIM signature in the headers. The |
| 71 | +recipient's server decrypts this signature using the DKIM record in the database's domain name. If |
| 72 | +the signature and the key contained in the record match, it proves the message is authentic and has |
| 73 | +not been altered during transport. |
71 | 74 |
|
72 | 75 | Enabling DKIM is **required** when sending emails **from a custom domain** using the Odoo email |
73 | 76 | server. |
74 | 77 |
|
75 | | -To enable DKIM, add a :abbr:`CNAME (Canonical Name)` record to the :abbr:`DNS (Domain Name System)` |
76 | | -zone of the domain name: |
| 78 | +Add a CNAME record for domain |
| 79 | +----------------------------- |
| 80 | + |
| 81 | +To enable DKIM, add a canonical name (CNAME) record to the domain name system (DNS) zone of the |
| 82 | +domain name: |
77 | 83 |
|
78 | 84 | .. code-block:: bash |
79 | 85 |
|
80 | 86 | odoo._domainkey IN CNAME odoo._domainkey.odoo.com. |
81 | 87 |
|
82 | | -.. tip:: |
83 | | - If the domain name is `company-name.com`, make sure to create a subdomain |
84 | | - `odoo._domainkey.company-name.com` whose canonical name is `odoo._domainkey.odoo.com.`. |
| 88 | +
|
| 89 | +If the domain name is *company-name.com*, make sure to create a CNAME record where the CNAME record |
| 90 | +(key/name) is `odoo._domainkey.company-name.com`, and the canonical name (value/content) is |
| 91 | +`odoo._domainkey.odoo.com.`. For example, note the differences between each key/value in italics\: |
| 92 | + |
| 93 | +.. list-table:: Example CNAME record |
| 94 | + :widths: 6 5 20 20 |
| 95 | + :header-rows: 0 |
| 96 | + :stub-columns: 1 |
| 97 | + |
| 98 | + * - Key |
| 99 | + - |
| 100 | + - odoo.\_domainkey |
| 101 | + - |
| 102 | + * - Value |
| 103 | + - |
| 104 | + - odoo.\_domainkey.\ *odoo.com.* |nbsp| |
| 105 | + - |
| 106 | + * - |
| 107 | + - OR |
| 108 | + - odoo.\_domainkey.\ *dbname*\ .odoo.com. |
| 109 | + - ... where *dbname* is the name of the Odoo database. |
| 110 | + |
| 111 | +On most DNS platforms, the DNS provider adds the custom domain (e.g., *company-name.com*) by |
| 112 | +default. In this case, the key looks different while the value remains the same: |
| 113 | + |
| 114 | +.. list-table:: Example CNAME record with custom domain |
| 115 | + :widths: 6 5 20 20 |
| 116 | + :header-rows: 0 |
| 117 | + :stub-columns: 1 |
| 118 | + |
| 119 | + * - Key |
| 120 | + - |
| 121 | + - odoo.\_domainkey.\ *company-name.com* |nbsp| |
| 122 | + - ... where *company-name.com* is the custom domain. |
| 123 | + * - Value |
| 124 | + - |
| 125 | + - odoo.\_domainkey.\ *odoo.com.* |nbsp| |
| 126 | + - |
| 127 | + * - |
| 128 | + - OR |
| 129 | + - odoo.\_domainkey.\ *dbname*\ .odoo.com. |
| 130 | + - ... where *dbname* is the name of the Odoo database. |
| 131 | + |
| 132 | +.. note:: |
| 133 | + If the DNS provider does not add the custom domain by default, make sure to include it. |
| 134 | + |
| 135 | +Add a CNAME record for subdomain |
| 136 | +-------------------------------- |
| 137 | + |
| 138 | +If there's a \ *subdomain* (e.g., *marketing* in *marketing*\ .company-name.com), add a CNAME record to include it |
| 139 | +for compliance as well: |
| 140 | + |
| 141 | +.. list-table:: Example CNAME record with subdomain |
| 142 | + :widths: 6 5 20 20 |
| 143 | + :header-rows: 0 |
| 144 | + :stub-columns: 1 |
| 145 | + |
| 146 | + * - Key |
| 147 | + - |
| 148 | + - odoo.\_domainkey.\ *marketing* |nbsp| |
| 149 | + - ... where *marketing* is the subdomain. |
| 150 | + * - |
| 151 | + - OR |
| 152 | + - odoo.\_domainkey.marketing.\ *company-name.com*\ |nbsp| |
| 153 | + - ... where *company-name.com* is the custom domain. |
| 154 | + * - Value |
| 155 | + - |
| 156 | + - odoo.\_domainkey.\ *odoo.com.* |nbsp| |
| 157 | + - |
| 158 | + * - |
| 159 | + - OR |
| 160 | + - odoo.\_domainkey.\ *dbname*\ .odoo.com. |
| 161 | + - ... where *dbname* is the name of the Odoo database. |
| 162 | + |
| 163 | +See DNS provider documentation |
| 164 | +------------------------------ |
85 | 165 |
|
86 | 166 | The way to create or modify a CNAME record depends on the provider hosting the DNS zone of the |
87 | 167 | domain name. The :ref:`most common providers <email-domain-providers-documentation>` and their |
88 | 168 | documentation are listed below. |
89 | 169 |
|
90 | 170 | Check if the DKIM record is valid using a tool like `MXToolbox DKIM Record Lookup |
91 | 171 | <https://mxtoolbox.com/dkim.aspx>`_. Enter `example.com:odoo` in the DKIM lookup tool, specifying |
92 | | -that the selector being tested is `odoo` for the custom domain `example.com`. |
| 172 | +that the selector being tested is *odoo* for the custom domain *example.com*. |
93 | 173 |
|
94 | 174 | .. _email-domain-dmarc: |
95 | 175 |
|
@@ -138,10 +218,13 @@ SPF, DKIM and DMARC documentation of common providers |
138 | 218 |
|
139 | 219 | - `OVH DNS <https://docs.ovh.com/us/en/domains/web_hosting_how_to_edit_my_dns_zone/>`_ |
140 | 220 | - `GoDaddy TXT record <https://www.godaddy.com/help/add-a-txt-record-19232>`_ |
141 | | -- `GoDaddy SPF, DKIM, or DMARC records <https://www.godaddy.com/help/set-up-spf-dkim-or-dmarc-records-for-my-hosting-email-40810>`_ |
142 | | -- `NameCheap <https://www.namecheap.com/support/knowledgebase/article.aspx/317/2237/how-do-i-add-txtspfdkimdmarc-records-for-my-domain/>`_ |
| 221 | +- `GoDaddy SPF, DKIM, or DMARC records |
| 222 | + <https://www.godaddy.com/help/set-up-spf-dkim-or-dmarc-records-for-my-hosting-email-40810>`_ |
| 223 | +- `NameCheap |
| 224 | + <https://www.namecheap.com/support/knowledgebase/article.aspx/317/2237/how-do-i-add-txtspfdkimdmarc-records-for-my-domain/>`_ |
143 | 225 | - `CloudFlare DNS <https://support.cloudflare.com/hc/en-us/articles/360019093151>`_ |
144 | | -- `Squarespace DNS records <https://support.squarespace.com/hc/en-us/articles/360002101888-Adding-custom-DNS-records-to-your-Squarespace-managed-domain>`_ |
| 226 | +- `Squarespace DNS records |
| 227 | + <https://support.squarespace.com/hc/en-us/articles/360002101888-Adding-custom-DNS-records-to-your-Squarespace-managed-domain>`_ |
145 | 228 | - `Azure DNS <https://docs.microsoft.com/en-us/azure/dns/dns-getstarted-portal>`_ |
146 | 229 |
|
147 | 230 | To fully test the configuration, use the `Mail-Tester <https://www.mail-tester.com/>`_ tool, which |
|
0 commit comments