The TRACE_DNS debug flag is useful for debugging problems with DMARC lookups from LISTSERV, as in conjunction with the "DEBUG QUERY TXT hostname" command, it can show you exactly what information LISTSERV is receiving (or not receiving) from its DNS servers.

To use the feature, issue the LISTSERV maintainer command "DEBUG FLAGS +TRACE_DNS".  For instance (the interesting parts are highlighted in light grey):

Paused - enter a command:

debug flags +trace_dns

1 Feb 2017 15:10:05 From LISTSERV@LISTSERV.EXAMPLE.COM: debug flags +trace_dns

* Debug flags for this session: 00000200

*

00000001 TRACE_DIST       [Trace DISTRIBUTE processing - OFF]

00000002 TRACE_MIME       [Trace MIME parser - OFF]

00000004 TRACE_LISTS      [Trace (a few) list-related functions - OFF]

00000008 TRACE_SPAM       [Trace spam filter calls - OFF]

00000010 TRACE_EMM        [Trace Embedded Mail-Merge processor - OFF]

00000020 TRACE_DEV        [Temporary ad hoc tracing for development use - OFF]

00000040 TRACE_FSAV       [Trace FSAV calls - OFF]

00000080 TRACE_LDAP_CALLS [Trace LDAP library calls - OFF]

00000100 TRACE_LDAP_DATA  [Trace data obtained from LDAP - OFF]

00000200 TRACE_DNS         Trace DNS lookups

08000000 HOLD_DISTBG      [Do not process background DISTRIBUTE jobs - OFF]

10000000 HOLD_XB64        [Hold X-B64 jobs instead of processing them - OFF]

20000000 KEEP_JOBFILES    [Keep successfully processed job files - OFF]

40000000 TRACE_TCPGUI     [Additional TCPGUI tracing - OFF]


Next, enter the command "DEBUG QUERY TXT hostname" with whatever hostname is configured in DNS with the DMARC TXT record LISTSERV should be referencing.

Paused - enter a command:

debug query txt _dmarc.yahoo.com

1 Feb 2017 15:10:43 From LISTSERV@LISTSERV.EXAMPLE.COM: debug query txt _dmarc.yahoo.com

1 Feb 2017 15:10:43 DBG> Looking up TXT records for _DMARC.YAHOO.COM

1 Feb 2017 15:10:43 DBG> Trying 8.8.8.4

1 Feb 2017 15:10:43 DBG> One record found

* _DMARC.YAHOO.COM IN TXT "v=DMARC1; p=reject; pct=100; rua=mailto:dmarc_y_rua@y

ahoo.com;"


If there is no DMARC record for the hostname you specify, the response will be different:

1 Feb 2017 15:21:37 DBG> Looking up TXT records for _DMARC.EXAMPLE.COM

1 Feb 2017 15:21:37 DBG> Trying 8.8.8.4

1 Feb 2017 15:21:37 DBG> No record found

* DNS query for _DMARC.EXAMPLE.COM returned no TXT record.


Finally, turn off the debug flag:

Paused - enter a command:

debug flags -trace_dns

1 Feb 2017 15:11:00 From LISTSERV@LISTSERV.EXAMPLE.COM: debug flags -trace_dns

* Debug flags for this session: 00000000

*

* 00000001 TRACE_DIST       [Trace DISTRIBUTE processing - OFF]

* 00000002 TRACE_MIME       [Trace MIME parser - OFF]

* 00000004 TRACE_LISTS      [Trace (a few) list-related functions - OFF]

* 00000008 TRACE_SPAM       [Trace spam filter calls - OFF]

* 00000010 TRACE_EMM        [Trace Embedded Mail-Merge processor - OFF]

* 00000020 TRACE_DEV        [Temporary ad hoc tracing for development use - OFF]

* 00000040 TRACE_FSAV       [Trace FSAV calls - OFF]

* 00000080 TRACE_LDAP_CALLS [Trace LDAP library calls - OFF]

* 00000100 TRACE_LDAP_DATA  [Trace data obtained from LDAP - OFF]

* 00000200 TRACE_DNS        [Trace DNS lookups - OFF]

* 08000000 HOLD_DISTBG      [Do not process background DISTRIBUTE jobs - OFF]

* 10000000 HOLD_XB64        [Hold X-B64 jobs instead of processing them - OFF]

* 20000000 KEEP_JOBFILES    [Keep successfully processed job files - OFF]

* 40000000 TRACE_TCPGUI     [Additional TCPGUI tracing - OFF]


These example commands were issued from the LISTSERV command line; note that the commands may also be issued by email or through the web interface's "LISTSERV command" pages.