Skip to main content

DMARC related tools for Modoboa

Project description

gha codecov

A set of tools to use DMARC through Modoboa.

This plugin is still in BETA stage, for now it only parses XML aggregated reports and generate visual reports (using c3.js) on a per-domain basis.


Make sure to install the following additional system package according to your distribution:

Debian / Ubuntu




Install this extension system-wide or inside a virtual environment by running the following command:

$ pip install modoboa-dmarc

Edit the file of your modoboa instance and add modoboa_dmarc inside the MODOBOA_APPS variable like this:

  # Extensions here

Run the following commands to setup the database tables:

$ cd <modoboa_instance_dir>
$ python migrate modoboa_dmarc
$ python collectstatic
$ python load_initial_data

Finally, restart the python process running modoboa (uwsgi, gunicorn, apache, whatever).

Integration with Postfix

A management command is provided to automatically parse DMARC aggregated reports (rua) and feed the database. The execution of this command can be automated with the definition of a postfix service and a custom transport table.

First, declare a new service in /etc/postfix/

dmarc-rua-parser unix  -       n       n       -       -       pipe
  flags= user=vmail:vmail argv=<path to python> <path to modoboa instance>/ import_aggregated_report --pipe

Define a new transport table inside /etc/postfix/

transport_maps =
    # other transport maps...

Create a file called /etc/postfix/dmarc_transport with the following content:

<email address your declared in your DNS record>  dmarc-rua-parser:

Hash the file using the following command:

$ postmap /etc/postfix/dmarc_transport

Finally, reload postfix:

$ service postfix reload

Specific Upgrade Instructions


modoboa-dmarc now requires an additional system package according to your distribution:

Debian / Ubuntu




Project details

Download files

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

Source Distribution

modoboa-dmarc-1.3.0.tar.gz (58.9 kB view hashes)

Uploaded source

Built Distribution

modoboa_dmarc-1.3.0-py2.py3-none-any.whl (82.7 kB view hashes)

Uploaded py2 py3

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