[GH-ISSUE #3399] get_authoritative_server does not use custom dns server #1848

Closed
opened 2026-02-27 11:19:28 +03:00 by kerem · 0 comments
Owner

Originally created by @zoc on GitHub (Jan 6, 2025).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/3399

Impacted versions

  • OS Type: Ubuntu
  • OS Version: 24.04
  • Database Type: MySQL
  • Database version: X.y
  • Modoboa: 2.3.4
  • Installer used: No
  • Webserver: Nginx/Apache

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")

Originally created by @zoc on GitHub (Jan 6, 2025). Original GitHub issue: https://github.com/modoboa/modoboa/issues/3399 # Impacted versions * OS Type: Ubuntu * OS Version: 24.04 * Database Type: MySQL * Database version: X.y * Modoboa: 2.3.4 * Installer used: No * Webserver: Nginx/Apache # 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: https://github.com/modoboa/modoboa/blob/2cb6ccebfa0224ef8a3e392ac130e637edf9e4b3/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") `
kerem 2026-02-27 11:19:28 +03:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1848
No description provided.