mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 17:36:01 +03:00
[GH-ISSUE #3399] get_authoritative_server does not use custom dns server #1848
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1848
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zoc on GitHub (Jan 6, 2025).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/3399
Impacted versions
Steps to reproduce
Configure a custom dns server in the Administration Panel and manually execute an MX check.
Current behavior
The get_authoritative_server function does not actually uses the configured resolver but the default one:
github.com/modoboa/modoboa@2cb6ccebfa/modoboa/admin/lib.py (L201)In my case it results in SPF and DKIM checks wrongly failing, because I have different DNS views for my domains, and the SPF and DKIM records are only available on views that are used when resolving from an external DNS server.
Expected behavior
The function should use the resolver returned by get_dns_resolver(). In practice the line mentioned above should be changed to:
answers = resolver.resolve(dnsname, "NS")