Skip to main content

Look up and report on the DMARC status of a domain.

Project description

Look up and report on the DMARC status of a domain

:Author: `Michael JasonSmith`_
:Contact: Michael JasonSmith <>
:Date: 2014-04-23
:Organization: ``_
:Copyright: This document is licensed under a
`Creative Commons Attribution-Share Alike 4.0 International License`_
by ``_.


This product allows systems look up and report on the DMARC
(Domain-based Message Authentication, Reporting and Conformance)
status of a domain [#dmarc]_. DMARC allows the owner of a domain
to publish a key that is used to verify if an email message
actually originated from the domain, and to publish what to do if
the verification fails. It is an extension of DKIM (DomainKeys
Identified Mail [#dkim]_) and SPF (Sender Policy Framework

Specifically this product supplies support for enumerating the
different DMARC policies_, and the `lookup_receiver_policy`_
function for querying the policy for a given domain.


There are three DMARC policies:

#. ``none`` does nothing, and domain verification is skipped.
#. ``reject`` causes the system that is receiving the message to
reject the message if the verification fails [#reject]_.
#. ``quarantine`` generally causes the message to be marked as
*spam* if verification fails.

These three policies are represented by the
``gs.dmarc.ReceiverPolicy`` enumeration [#enum34]_.


Query the DMARC receiver policy for a host





The ``gs.dmarc.lookup_receiver_policy`` function queries up the
policy for receiving messages from a host, and reports back the


The host to query. The *actual* host that is queried has
``_dmarc.`` prepended to it.


It returns a value from the ``gs.dmarc.ReceiverPolicy``
enumeration (see Policies_). If the host does not exist, or there
is no published DMARC policy then
``gs.dmarc.ReceiverPolicy.none`` is returned.


- Code repository:
- Questions and comments to
- Report bugs at

.. [#dmarc] See `the internet-draft`_ Domain-based Message
Authentication, Reporting and Conformance (DMARC)
.. _the internet-draft:
.. [#dkim] See `RFC 6376`_: DomainKeys Identified Mail (DKIM) Signatures
.. _RFC 6376:
.. [#spf] See `RFC 4408`_: Sender Policy Framework (SPF) for
Authorizing Use of Domains in E-Mail, Version 1
.. _RFC 4408:
.. [#reject] Quite what "reject" means is a discussion for
another time. Suffice it to say, it is bad.
.. [#enum34] `The enum34 package`_ is used to provide `Enum`_
support for releases of Python prior to 3.4.
.. _The enum34 package:
.. _Enum:
.. _GroupServer:
.. _OnlineGroups.Net:
.. _Michael JasonSmith:
.. _Creative Commons Attribution-Share Alike 4.0 International License:

.. LocalWords: DMARC DKIM DomainKeys dkim groupserver spf enum
.. LocalWords: lookup


1.0.0 (2014-04-24)

- Initial release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions (64.8 kB view hashes)

Uploaded Source (21.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page