Skip to main content

django-dmarc2 0.5.2 for Django 2 and Python 3

Managing DMARC aggregate and feedback reports

Designed to quickly and easily manage DMARC aggregate and feedback reports.

Description

This Django DMARC project aims to ease implementating DMARC “Domain-based Message Authentication, Reporting & Conformance” and ongoing monitoring by importing aggregate and feedback reports about messages that pass and/or fail DMARC evaluation into a more easily digested format.

Perhaps one of the main reasons DMARC is gaining traction amongst organisations of all sizes is a desire to protect their people, brand and reputation. By defining and implementing a DMARC policy, an organization can help combat phishing, protect users and their reputation.

At beta stage, the application is stable, with most efforts on improving usability and documentation.

Choosing Django was an easy choice as it offers an easily built import mechanism and transformation from xml to database through to presentation.

Although it has options for importing either xml or email files, zero maintenance is achieved by fully automating import of feedback and reports.

Quick start

  1. Install the app

  2. Add “dmarc” to your INSTALLED_APPS setting:

    INSTALLED_APPS = (
        ...
        'dmarc',
    )
  3. Add dmarc.urls to your urls:

    from dmarc import urls as dmarc_urls
    
    urlpatterns = [
        ...
        url(r"^dmarc/", include(dmarc_urls)),
    ]
  4. Run ‘python manage.py migrate’ to create the database models.

  5. Import a report with:

    python manage.py importdmarcreport --email
  6. See your aggregated feedback reports from the Admin page at admin/dmarc

Usage

python manage.py importdmarcreport –email

You can choose to import an xml or email file, alternatively with “–email -” you can pipe an email and it will do the right thing.

Installation

Install the app

Configuration

Add “dmarc” to your INSTALLED_APPS setting:

INSTALLED_APPS = (
    ...
    'dmarc',
)

Add dmarc.urls to your urls:

from dmarc import urls as dmarc_urls

urlpatterns = [
    ...
    url(r"^dmarc/", include(dmarc_urls)),
]

DMARC reports are namespaced so if you’re using django version 1.8 you will need to add the namespace ‘dmarc’:

urlpatterns = [
    ...
    url(r"^dmarc/", include(dmarc_urls, namespace='dmarc')),
]

Install tables

Run ‘python manage.py migrate’ to create the database tables.

Import feedback report

Import an email DMARC aggregate report with:

python manage.py importdmarcreport --email

Alternatively the xml report can be imported with:

python manage.py importdmarcreport --xml

The process of importing DMARC aggregate reports can be fully automated. At Persistent Objects we use Exim and the configuration couldn’t be easier.

Router:

dmarcreports:
    driver = accept
    condition = ${if eq{$local_part}{dmarc_report}}
    transport = trans_dmarcreports

Transport:

trans_dmarcreports:
    driver = pipe
    command = "/usr/local/bin/python2.7 /path/to/manage.py importdmarcreport --email -"
    freeze_exec_fail = true
    return_fail_output = true

Congratulations, you have django-dmarc installed and ready to import DMARC aggregate feedback reports and start implementing DMARC and protecting your emails.

DMARC reporting

Aggregated feedback reports are available from the Admin page at admin/dmarc.

Django Administration showing this DMARC application

From the DMARC dashboard at ‘Site administration/DMARC’ where the intention is to highlight a summary of recent reports, there is one report ‘DMARC feedback reports’ and is available to any user with staff members authorization.

DMARC dashboard

This is an example report, it can also be downloaded as a csv file suitable for importing into your favourite spreadsheet.

Example DMARC aggregate feedback report

The report can be filtered by clicking on the filter and changing any of the reporting period, only showing errors/failures, disposition (quarantine, rejection or any) and by source ip address/reporting organisation.

Example DMARC aggregate feedback report

These reports can help ease any DMARC implementation.

Maintenance

Although there is usually no need to remove old records, access to the report table is offered to allow for record deletion.

Dependencies

Resources

Support

To report a security issue, please send an email privately to ahicks@p-o.co.uk. This gives us a chance to fix the issue and create an official release prior to the issue being made public.

For general questions or comments, please contact ahicks@p-o.co.uk.

Project website

Communications are expected to conform to the Django Code of Conduct.

Release files for django-dmarc2 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-dmarc2 0.5.2
File Size Uploaded
django-dmarc2-0.5.2.tar.gz 181.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-dmarc2 0.5.2
File Interpreter ABI Platform
django_dmarc2-0.5.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 221.5 kB

Release files / django-dmarc2-0.5.2.tar.gz

Download URL django-dmarc2-0.5.2.tar.gz
Size 181.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f65b0da4f5ef1f3b8dc17554f4ab50ea3ed766e052d197ad1795a65e8f0aa944
BLAKE2b-256 checksum
How to use checksums
77317d5f918965f96452d4f3a739cd1562827d30023e8d98450f21503a8779ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.2

Release files / django_dmarc2-0.5.2-py2.py3-none-any.whl

Download URL django_dmarc2-0.5.2-py2.py3-none-any.whl
Size 39.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7ef94dfca8163d2ee9c964363ae3646cba8398f12d37cfc4d8df75970cb49159
BLAKE2b-256 checksum
How to use checksums
75520a63f67721b8622132b1c63534809b568d7eedc970f7f096f1f250bf183b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page