JMAP - DNS requests during Account export & import #184
Replies: 4 comments 2 replies
-
Hi, Both the 'export' and 'import' commands use JMAP to download and then insert the records. Since JMAP is an HTTP based protocol, all those DNS requests you are seeing are for each HTTP request sent to the server. The CLI tool could be improved to use JMAP over WebSockets which will use just one connection rather than many. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your fast answer. Fewer DNS requests would be nice. I run my own mail server and use the external DNS server provided by my hoster. If the external DNS server has a rate limit, the export can be slowed down and/or canceled. |
Beta Was this translation helpful? Give feedback.
-
Using your own DNS resolver is generally recommended when running a mail server because spam filters tend to make lots of DNS request. |
Beta Was this translation helpful? Give feedback.
-
That may be true depending on the amount of connections and emails processed. I just would like to point out, that a local export/import are triggering that amount of DNS requests, and that the import/export are not taking advantage of DNS caching. Less DNS requests would be desirable if an import or export is executed locally. Or taking advantage of the DNS caching mechanism. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
it is recommended for the upgrade from 0.4.2 to 0.5.0 to export all accounts and import them later.
I tried that on my test environment, witch is a VM running on my PC at home. The VM is using my pi.hole as DNS server, just like all other devices do.
My VM is named "debian". But my pi.hole has an DNS record identifying the VM as mail.***.. I can copy all data to my test environment and simulate the upgrade with my real domain name and data.
During the first export, die VM submitted about 6000 DNS requests per minute towards my pi.hole, queuing mail.***.. I found the reason myself: pi.hole uses a TTL of zero in all DNS replies, no caching.
To make my test environment more realistic, I increased TTL to 600 and expected just a few DNS requests. Because the reply should be cached for a while. But still about 1500 DNS requests per minute were submitted.
The same thing happened during import.
I added the servers dns-name & IP-Address in /etc/hosts (both, the "real" and the one inside docker), but that changed nothing.
Why the import and export are triggering so many DNS requests?
Or is it just a fault in my test environment, causing the amount of DNS requests?
Thank you in advance for any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions