dmarc-metrics-exporter


Namedmarc-metrics-exporter JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/jgosmann/dmarc-metrics-exporter/
SummaryExport Prometheus metrics from DMARC reports.
upload_time2024-10-15 19:42:46
maintainerNone
docs_urlNone
authorJan Gosmann
requires_python<4.0,>=3.9
licenseMIT
keywords dmarc dkim spf prometheus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://github.com/jgosmann/dmarc-metrics-exporter/actions/workflows/ci.yml/badge.svg
  :target: https://github.com/jgosmann/dmarc-metrics-exporter/actions/workflows/ci.yml
  :alt: CI and release pipeline
.. image:: https://codecov.io/gh/jgosmann/dmarc-metrics-exporter/branch/main/graph/badge.svg?token=O4M05YWNQK
  :target: https://codecov.io/gh/jgosmann/dmarc-metrics-exporter
  :alt: Codecov coverage
.. image:: https://img.shields.io/pypi/v/dmarc-metrics-exporter
  :target: https://pypi.org/project/dmarc-metrics-exporter/
  :alt: PyPI
.. image:: https://img.shields.io/pypi/pyversions/dmarc-metrics-exporter
  :target: https://pypi.org/project/dmarc-metrics-exporter/
  :alt: PyPI - Python Version
.. image:: https://img.shields.io/pypi/l/dmarc-metrics-exporter
  :target: https://pypi.org/project/dmarc-metrics-exporter/
  :alt: PyPI - License

dmarcs-metrics-exporter
=======================

Export metrics derived from DMARC aggregate reports to Prometheus.
This exporter regularly polls
for new aggregate report emails
via IMAP.
The following metrics will be collected
and exposed at an HTTP endpoint
for Prometheus:

* ``dmarc_total``: Total number of reported messages.
* ``dmarc_compliant_total``: Total number of DMARC compliant messages.
* ``dmarc_quarantine_total``: Total number of quarantined messages.
* ``dmarc_reject_total``: Total number of rejected messages.
* ``dmarc_spf_aligned_total``: Total number of SPF algined messages.
* ``dmarc_spf_pass_total``: Total number of messages with raw SPF pass.
* ``dmarc_dkim_aligned_total``: Total number of DKIM algined messages.
* ``dmarc_dkim_pass_total``: Total number of messages with raw DKIM pass.

Each of these metrics is subdivided by the following labels:

* ``reporter``: Domain from which a DMARC aggregate report originated.
* ``from_domain``: Domain from which the evaluated email originated.
* ``dkim_domain``: Domain the DKIM signature is for.
* ``spf_domain``: Domain used for the SPF check.

In addition, there is a ``dmarc_invalid_reports_total`` metric with a count of
DMARC report emails from which no report could be parsed. It is subdivided by
a single ``from_email`` label.


Installation
------------

This describes the manual setup fo dmarc-metrics-exporter.
An Ansible role for automated deployment is provided in ``roles``.
Further instructions for Ansible are given in the readme file
provided in that directory.

It is best to run dmarc-metrics-exporter under a separate system user account.
Create one for example with

.. code-block:: bash

    adduser --system --group dmarc-metrics

Then you can install dmarc-metrics-exporter with ``pip`` from PyPI for that
user:

.. code-block:: bash

    sudo -u dmarc-metrics pip3 install dmarc-metrics-exporter

You will need a location to store the ``metrics.db`` that is writable by that
user, for example:

.. code-block:: bash

    mkdir /var/lib/dmarc-metrics-exporter
    chown dmarc-metrics:dmarc-metrics /var/lib/dmarc-metrics-exporter


Configuration
-------------

To run dmarc-metrics-exporter a configuration file in JSON format is required.
The default location is ``/etc/dmarc-metrics-exporter.json``.

Because the configuration file will contain the IMAP password,
make sure to ensure proper permissions on it,
for example:

.. code-block:: bash

    chown root:dmarc-metrics /etc/dmarc-metrics-exporter.json
    chmod 640 /etc/dmarc-metrics-exporter.json

An example configuration file is provided in this repository in
``config/dmarc-metrics-exporter.sample.json``.

The following configuration options are available:

* ``listen_addr`` (string, default ``"127.0.0.1"``): Listen address for the HTTP endpoint. Use ``"0.0.0.0"`` if running in a dockerized environment.
* ``port`` (number, default ``9797``): Port to listen on for the HTTP endpoint.
* ``imap`` (object, required): IMAP configuration to check for aggregate reports.

  * ``host`` (string, default ``"localhost"``): Hostname of IMAP server to connect to.
  * ``port`` (number, default ``993``): Port of the IMAP server to connect to.
  * ``username`` (string, required): Login username for the IMAP connection.
  * ``password``: (string, required): Login password for the IMAP connection.
  * ``use_ssl``: (boolean, default ``true``): Whether to use SSL encryption for the connection. Disabling this will transmit the password in clear text! Currently, there is no support for STARTTLS.
  * ``verify_certificate``: (boolean, default ``true``): Whether to verify the server's SSL certificate. You might have to set this to ``false`` if you are using a self-signed certificate. If this is disabled, someone else could impersonate the server and obtain the login data.

* ``folders`` (object):

  * ``inbox`` (string, default ``"INBOX"``): IMAP mailbox that is checked for incoming DMARC aggregate reports.
  * ``done`` (string, default ``"Archive"``): IMAP mailbox that successfully processed reports are moved to.
  * ``error``: (string, default ``"Invalid"``): IMAP mailbox that emails are moved to that could not be processed.

* ``storage_path`` (string, default ``"/var/lib/dmarc-metrics-exporter"``):
  Directory to persist data in that has to persisted between restarts.
* ``poll_interval_seconds`` (number, default ``60``): How often to poll the IMAP server in seconds.
* ``deduplication_max_seconds`` (number, default ``604800`` which is 7 days): How long individual report IDs will be remembered to avoid counting double delivered reports twice.
* ``logging`` (object, default ``{}``): Logging configuration, see the "Logging configuration" section below.

Logging configuration
^^^^^^^^^^^^^^^^^^^^^

When providing a custom logging configuration, it must follow the dictionary
schema (version 1) described in the `logging.config documentation <https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema>`_.
In general, a provided top-level key will replace the default configuration,
but there are some exceptions. The following keys are always fixed:

* ``version`` will always be ``1``.
* ``incremental`` will always be ``false``.
* ``formatters`` is fixed and provides the following formatters:

  * ``plain`` renders human-readable log messages without colors.
  * ``colored`` renders human-readable log messages with colors.
  * ``json`` renders structured JSON log messages.

In addition, the ``root`` key has some special handling. If it is overridden,
but not ``handlers`` key is provided, ``handlers: ['default']`` will be inserted
automatically. Also, the ``level`` key will be set to ``'DEBUG'`` if the
application is started with the ``--debug`` flag.

Configuring log level
"""""""""""""""""""""

To change the log level globally:

.. code-block:: json

    {
        "logging": {
            "root": {
                "level": "WARNING"
            }
        }
    }

Configuring logging format
""""""""""""""""""""""""""

To change the logging format:

.. code-block:: json

    {
        "logging": {
            "handlers": {
                "default": {
                    "class": "logging.StreamHandler",
                    "formatter": "json"
                }
            }
        }
    }

Valid formats are ``plain``, ``colored``, and ``json``.

Disabling Uvicorn access logs
"""""""""""""""""""""""""""""

To disable the Uvicorn access logs:

.. code-block:: json

    {
        "logging": {
            "loggers": {
                "uvicorn.access": {
                    "propagate": false
                }
            }
        }
    }


Usage
-----

To run dmarc-metrics-exporter with the default configuration in
``/etc/dmarc-metrics-exporter.json``:

.. code-block:: bash

    sudo -u dmarc-metrics python3 -m dmarc_metrics_exporter

To use a different configuration file:

.. code-block:: bash

    sudo -u dmarc-metrics python3 -m dmarc_metrics_exporter --configuration <path>

You can enable debug logging with the `--debug`
if you do not want to provide your own logging configuration:

.. code-block:: bash

    sudo -u dmarc-metrics python3 -m dmarc_metrics_exporter --debug


systemd
^^^^^^^

Instead of manually starting the dmarc-metrics-exporter,
you likely want to have it run as a system service.
An example systemd service file is provided in this repository in
``config/dmarc-metrics-exporter.service``.
Make sure that the paths and user/group names match your configuration
and copy it to ``/etc/systemd/system`` to use it.
To have systemd pick it up a ``systemctl daemon-reload`` might be necessary.

You can than start/stop dmarc-metrics-exorter with:

.. code-block:: bash

    systemctl start dmarc-metrics-exporter
    systemctl stop dmarc-metrics-exporter

To have dmarc-metrics-exporter start on system boot:

.. code-block:: bash

    systemctl enable dmarc-metrics-exporter

Docker
^^^^^^

A new docker image is build for each release
with GitHub Actions as described in this yaml-file:
``.github/workflows/docker-publish.yml``.

Note that you should configure the `listen_addr` to `0.0.0.0` to be able to
access the metrics exporter from outside the container.

Example docker-compose file:

.. code-block:: yml

    version: "3"

    services:

      dmarc-metrics-exporter:
        # source: https://github.com/jamborjan/dmarc-metrics-exporter/pkgs/container/dmarc-metrics-exporter
        container_name: dmarc-metrics-exporter
        hostname: dmarc-metrics-exporter
        image: jgosmann/dmarc-metrics-exporter:1.2.0
        restart: unless-stopped
        user: 1000:1000 #PUID=1000:PGID=1000
        expose:
          - 9797
        volumes:
          - '/host/folder/dmarc-metrics-exporter.json:/etc/dmarc-metrics-exporter.json'
          - '/host/folder/dmarc-metrics-exporter/metrics:/var/lib/dmarc-metrics-exporter:rw'
        logging:
          driver: "json-file"
          options:
            tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
        networks:
          - YourDockerLan

    # $ docker network create -d bridge --attachable YourDockerLan
    networks:
      YourDockerLan:
        external:
          name: YourDockerLan

Prometheus
^^^^^^^^^^

Example prometheus config file:

.. code-block:: yml

    global:
      scrape_interval: 15s
      evaluation_interval: 15s

    rule_files:

    scrape_configs:

      - job_name: 'dmarc-metrics-exporter'
        static_configs:
          - targets: ['dmarc-metrics-exporter:9797']

Grafana
^^^^^^^

An example configuration file is provided in this repository in
``config/dmarc-metrics-exporter.grafana.sample.json``. This example dashboard displays the collected metrics as shown in the screenshot below.

.. figure:: config/dmarc-metrics-exporter.grafana.sample.png

   Example grafana dashboard

Hints
^^^^^

You should not use your normal email and password credentials for the dmarc-metrics-exporter.
If you are not able to create a dedicated service account email account, you should use an app password.

Microsoft Exchange Online
"""""""""""""""""""""""""

* App passwords are available when you are using Multi Factor Authentication (MFA).
  `Manage app passwords for two-step verification <https://account.activedirectory.windowsazure.com/AppPasswords.aspx>`_
* If you don't see the app passwords option or get an error,
  `check if MFA is enabled <https://account.activedirectory.windowsazure.com/UserManagement/MultifactorVerification.aspx>`_
  for the user.
* If you still don't see the app passwords option,
  `check if app passwords are allowed in your organization <https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-app-passwords#allow-users-to-create-app-passwords>`_
* Finally, `ensure that IMAP is enabled for the user <https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/pop3-and-imap4/enable-or-disable-pop3-or-imap4-access>`_.


Development
-----------

Prerequisites
^^^^^^^^^^^^^

* `Python <https://www.python.org/>`_
* `pre-commit <https://pre-commit.com/>`_
* `Poetry <https://python-poetry.org/>`_
* `Docker <https://www.docker.com/>`_

Setup development environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: bash

    pre-commit install
    poetry install


Run tests
^^^^^^^^^

.. code-block:: bash

    docker-compose up -d
    poetry run pytest

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jgosmann/dmarc-metrics-exporter/",
    "name": "dmarc-metrics-exporter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "DMARC, DKIM, SPF, Prometheus",
    "author": "Jan Gosmann",
    "author_email": "jan@hyper-world.de",
    "download_url": "https://files.pythonhosted.org/packages/83/8a/d87fc9cc2da1ab6aa86c4166e28f90d8f5d490388bfb9f531eb1419512cb/dmarc_metrics_exporter-1.2.0.tar.gz",
    "platform": null,
    "description": ".. image:: https://github.com/jgosmann/dmarc-metrics-exporter/actions/workflows/ci.yml/badge.svg\n  :target: https://github.com/jgosmann/dmarc-metrics-exporter/actions/workflows/ci.yml\n  :alt: CI and release pipeline\n.. image:: https://codecov.io/gh/jgosmann/dmarc-metrics-exporter/branch/main/graph/badge.svg?token=O4M05YWNQK\n  :target: https://codecov.io/gh/jgosmann/dmarc-metrics-exporter\n  :alt: Codecov coverage\n.. image:: https://img.shields.io/pypi/v/dmarc-metrics-exporter\n  :target: https://pypi.org/project/dmarc-metrics-exporter/\n  :alt: PyPI\n.. image:: https://img.shields.io/pypi/pyversions/dmarc-metrics-exporter\n  :target: https://pypi.org/project/dmarc-metrics-exporter/\n  :alt: PyPI - Python Version\n.. image:: https://img.shields.io/pypi/l/dmarc-metrics-exporter\n  :target: https://pypi.org/project/dmarc-metrics-exporter/\n  :alt: PyPI - License\n\ndmarcs-metrics-exporter\n=======================\n\nExport metrics derived from DMARC aggregate reports to Prometheus.\nThis exporter regularly polls\nfor new aggregate report emails\nvia IMAP.\nThe following metrics will be collected\nand exposed at an HTTP endpoint\nfor Prometheus:\n\n* ``dmarc_total``: Total number of reported messages.\n* ``dmarc_compliant_total``: Total number of DMARC compliant messages.\n* ``dmarc_quarantine_total``: Total number of quarantined messages.\n* ``dmarc_reject_total``: Total number of rejected messages.\n* ``dmarc_spf_aligned_total``: Total number of SPF algined messages.\n* ``dmarc_spf_pass_total``: Total number of messages with raw SPF pass.\n* ``dmarc_dkim_aligned_total``: Total number of DKIM algined messages.\n* ``dmarc_dkim_pass_total``: Total number of messages with raw DKIM pass.\n\nEach of these metrics is subdivided by the following labels:\n\n* ``reporter``: Domain from which a DMARC aggregate report originated.\n* ``from_domain``: Domain from which the evaluated email originated.\n* ``dkim_domain``: Domain the DKIM signature is for.\n* ``spf_domain``: Domain used for the SPF check.\n\nIn addition, there is a ``dmarc_invalid_reports_total`` metric with a count of\nDMARC report emails from which no report could be parsed. It is subdivided by\na single ``from_email`` label.\n\n\nInstallation\n------------\n\nThis describes the manual setup fo dmarc-metrics-exporter.\nAn Ansible role for automated deployment is provided in ``roles``.\nFurther instructions for Ansible are given in the readme file\nprovided in that directory.\n\nIt is best to run dmarc-metrics-exporter under a separate system user account.\nCreate one for example with\n\n.. code-block:: bash\n\n    adduser --system --group dmarc-metrics\n\nThen you can install dmarc-metrics-exporter with ``pip`` from PyPI for that\nuser:\n\n.. code-block:: bash\n\n    sudo -u dmarc-metrics pip3 install dmarc-metrics-exporter\n\nYou will need a location to store the ``metrics.db`` that is writable by that\nuser, for example:\n\n.. code-block:: bash\n\n    mkdir /var/lib/dmarc-metrics-exporter\n    chown dmarc-metrics:dmarc-metrics /var/lib/dmarc-metrics-exporter\n\n\nConfiguration\n-------------\n\nTo run dmarc-metrics-exporter a configuration file in JSON format is required.\nThe default location is ``/etc/dmarc-metrics-exporter.json``.\n\nBecause the configuration file will contain the IMAP password,\nmake sure to ensure proper permissions on it,\nfor example:\n\n.. code-block:: bash\n\n    chown root:dmarc-metrics /etc/dmarc-metrics-exporter.json\n    chmod 640 /etc/dmarc-metrics-exporter.json\n\nAn example configuration file is provided in this repository in\n``config/dmarc-metrics-exporter.sample.json``.\n\nThe following configuration options are available:\n\n* ``listen_addr`` (string, default ``\"127.0.0.1\"``): Listen address for the HTTP endpoint. Use ``\"0.0.0.0\"`` if running in a dockerized environment.\n* ``port`` (number, default ``9797``): Port to listen on for the HTTP endpoint.\n* ``imap`` (object, required): IMAP configuration to check for aggregate reports.\n\n  * ``host`` (string, default ``\"localhost\"``): Hostname of IMAP server to connect to.\n  * ``port`` (number, default ``993``): Port of the IMAP server to connect to.\n  * ``username`` (string, required): Login username for the IMAP connection.\n  * ``password``: (string, required): Login password for the IMAP connection.\n  * ``use_ssl``: (boolean, default ``true``): Whether to use SSL encryption for the connection. Disabling this will transmit the password in clear text! Currently, there is no support for STARTTLS.\n  * ``verify_certificate``: (boolean, default ``true``): Whether to verify the server's SSL certificate. You might have to set this to ``false`` if you are using a self-signed certificate. If this is disabled, someone else could impersonate the server and obtain the login data.\n\n* ``folders`` (object):\n\n  * ``inbox`` (string, default ``\"INBOX\"``): IMAP mailbox that is checked for incoming DMARC aggregate reports.\n  * ``done`` (string, default ``\"Archive\"``): IMAP mailbox that successfully processed reports are moved to.\n  * ``error``: (string, default ``\"Invalid\"``): IMAP mailbox that emails are moved to that could not be processed.\n\n* ``storage_path`` (string, default ``\"/var/lib/dmarc-metrics-exporter\"``):\n  Directory to persist data in that has to persisted between restarts.\n* ``poll_interval_seconds`` (number, default ``60``): How often to poll the IMAP server in seconds.\n* ``deduplication_max_seconds`` (number, default ``604800`` which is 7 days): How long individual report IDs will be remembered to avoid counting double delivered reports twice.\n* ``logging`` (object, default ``{}``): Logging configuration, see the \"Logging configuration\" section below.\n\nLogging configuration\n^^^^^^^^^^^^^^^^^^^^^\n\nWhen providing a custom logging configuration, it must follow the dictionary\nschema (version 1) described in the `logging.config documentation <https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema>`_.\nIn general, a provided top-level key will replace the default configuration,\nbut there are some exceptions. The following keys are always fixed:\n\n* ``version`` will always be ``1``.\n* ``incremental`` will always be ``false``.\n* ``formatters`` is fixed and provides the following formatters:\n\n  * ``plain`` renders human-readable log messages without colors.\n  * ``colored`` renders human-readable log messages with colors.\n  * ``json`` renders structured JSON log messages.\n\nIn addition, the ``root`` key has some special handling. If it is overridden,\nbut not ``handlers`` key is provided, ``handlers: ['default']`` will be inserted\nautomatically. Also, the ``level`` key will be set to ``'DEBUG'`` if the\napplication is started with the ``--debug`` flag.\n\nConfiguring log level\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nTo change the log level globally:\n\n.. code-block:: json\n\n    {\n        \"logging\": {\n            \"root\": {\n                \"level\": \"WARNING\"\n            }\n        }\n    }\n\nConfiguring logging format\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nTo change the logging format:\n\n.. code-block:: json\n\n    {\n        \"logging\": {\n            \"handlers\": {\n                \"default\": {\n                    \"class\": \"logging.StreamHandler\",\n                    \"formatter\": \"json\"\n                }\n            }\n        }\n    }\n\nValid formats are ``plain``, ``colored``, and ``json``.\n\nDisabling Uvicorn access logs\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nTo disable the Uvicorn access logs:\n\n.. code-block:: json\n\n    {\n        \"logging\": {\n            \"loggers\": {\n                \"uvicorn.access\": {\n                    \"propagate\": false\n                }\n            }\n        }\n    }\n\n\nUsage\n-----\n\nTo run dmarc-metrics-exporter with the default configuration in\n``/etc/dmarc-metrics-exporter.json``:\n\n.. code-block:: bash\n\n    sudo -u dmarc-metrics python3 -m dmarc_metrics_exporter\n\nTo use a different configuration file:\n\n.. code-block:: bash\n\n    sudo -u dmarc-metrics python3 -m dmarc_metrics_exporter --configuration <path>\n\nYou can enable debug logging with the `--debug`\nif you do not want to provide your own logging configuration:\n\n.. code-block:: bash\n\n    sudo -u dmarc-metrics python3 -m dmarc_metrics_exporter --debug\n\n\nsystemd\n^^^^^^^\n\nInstead of manually starting the dmarc-metrics-exporter,\nyou likely want to have it run as a system service.\nAn example systemd service file is provided in this repository in\n``config/dmarc-metrics-exporter.service``.\nMake sure that the paths and user/group names match your configuration\nand copy it to ``/etc/systemd/system`` to use it.\nTo have systemd pick it up a ``systemctl daemon-reload`` might be necessary.\n\nYou can than start/stop dmarc-metrics-exorter with:\n\n.. code-block:: bash\n\n    systemctl start dmarc-metrics-exporter\n    systemctl stop dmarc-metrics-exporter\n\nTo have dmarc-metrics-exporter start on system boot:\n\n.. code-block:: bash\n\n    systemctl enable dmarc-metrics-exporter\n\nDocker\n^^^^^^\n\nA new docker image is build for each release\nwith GitHub Actions as described in this yaml-file:\n``.github/workflows/docker-publish.yml``.\n\nNote that you should configure the `listen_addr` to `0.0.0.0` to be able to\naccess the metrics exporter from outside the container.\n\nExample docker-compose file:\n\n.. code-block:: yml\n\n    version: \"3\"\n\n    services:\n\n      dmarc-metrics-exporter:\n        # source: https://github.com/jamborjan/dmarc-metrics-exporter/pkgs/container/dmarc-metrics-exporter\n        container_name: dmarc-metrics-exporter\n        hostname: dmarc-metrics-exporter\n        image: jgosmann/dmarc-metrics-exporter:1.2.0\n        restart: unless-stopped\n        user: 1000:1000 #PUID=1000:PGID=1000\n        expose:\n          - 9797\n        volumes:\n          - '/host/folder/dmarc-metrics-exporter.json:/etc/dmarc-metrics-exporter.json'\n          - '/host/folder/dmarc-metrics-exporter/metrics:/var/lib/dmarc-metrics-exporter:rw'\n        logging:\n          driver: \"json-file\"\n          options:\n            tag: \"{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}\"\n        networks:\n          - YourDockerLan\n\n    # $ docker network create -d bridge --attachable YourDockerLan\n    networks:\n      YourDockerLan:\n        external:\n          name: YourDockerLan\n\nPrometheus\n^^^^^^^^^^\n\nExample prometheus config file:\n\n.. code-block:: yml\n\n    global:\n      scrape_interval: 15s\n      evaluation_interval: 15s\n\n    rule_files:\n\n    scrape_configs:\n\n      - job_name: 'dmarc-metrics-exporter'\n        static_configs:\n          - targets: ['dmarc-metrics-exporter:9797']\n\nGrafana\n^^^^^^^\n\nAn example configuration file is provided in this repository in\n``config/dmarc-metrics-exporter.grafana.sample.json``. This example dashboard displays the collected metrics as shown in the screenshot below.\n\n.. figure:: config/dmarc-metrics-exporter.grafana.sample.png\n\n   Example grafana dashboard\n\nHints\n^^^^^\n\nYou should not use your normal email and password credentials for the dmarc-metrics-exporter.\nIf you are not able to create a dedicated service account email account, you should use an app password.\n\nMicrosoft Exchange Online\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n* App passwords are available when you are using Multi Factor Authentication (MFA).\n  `Manage app passwords for two-step verification <https://account.activedirectory.windowsazure.com/AppPasswords.aspx>`_\n* If you don't see the app passwords option or get an error,\n  `check if MFA is enabled <https://account.activedirectory.windowsazure.com/UserManagement/MultifactorVerification.aspx>`_\n  for the user.\n* If you still don't see the app passwords option,\n  `check if app passwords are allowed in your organization <https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-app-passwords#allow-users-to-create-app-passwords>`_\n* Finally, `ensure that IMAP is enabled for the user <https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/pop3-and-imap4/enable-or-disable-pop3-or-imap4-access>`_.\n\n\nDevelopment\n-----------\n\nPrerequisites\n^^^^^^^^^^^^^\n\n* `Python <https://www.python.org/>`_\n* `pre-commit <https://pre-commit.com/>`_\n* `Poetry <https://python-poetry.org/>`_\n* `Docker <https://www.docker.com/>`_\n\nSetup development environment\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n    pre-commit install\n    poetry install\n\n\nRun tests\n^^^^^^^^^\n\n.. code-block:: bash\n\n    docker-compose up -d\n    poetry run pytest\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Export Prometheus metrics from DMARC reports.",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/jgosmann/dmarc-metrics-exporter/",
        "Repository": "https://github.com/jgosmann/dmarc-metrics-exporter/"
    },
    "split_keywords": [
        "dmarc",
        " dkim",
        " spf",
        " prometheus"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8f09f72bdd7a9553a6bc59016e78007f604bb12b8416eaffa322396c27d56732",
                "md5": "ce6ba30f1d0e97bf8233cd2c3a039801",
                "sha256": "35fb3218d1fd973a49a92d052368eb4e023c40ec99d35fcb46fc0332b8c834d3"
            },
            "downloads": -1,
            "filename": "dmarc_metrics_exporter-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce6ba30f1d0e97bf8233cd2c3a039801",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 44833,
            "upload_time": "2024-10-15T19:42:45",
            "upload_time_iso_8601": "2024-10-15T19:42:45.105189Z",
            "url": "https://files.pythonhosted.org/packages/8f/09/f72bdd7a9553a6bc59016e78007f604bb12b8416eaffa322396c27d56732/dmarc_metrics_exporter-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "838ad87fc9cc2da1ab6aa86c4166e28f90d8f5d490388bfb9f531eb1419512cb",
                "md5": "a61b5842facd77d45dd359cd33a528ef",
                "sha256": "55300ee736e47e3c015dbf11bccafdc9099911038645d544597895d6961f4303"
            },
            "downloads": -1,
            "filename": "dmarc_metrics_exporter-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a61b5842facd77d45dd359cd33a528ef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 37918,
            "upload_time": "2024-10-15T19:42:46",
            "upload_time_iso_8601": "2024-10-15T19:42:46.314550Z",
            "url": "https://files.pythonhosted.org/packages/83/8a/d87fc9cc2da1ab6aa86c4166e28f90d8f5d490388bfb9f531eb1419512cb/dmarc_metrics_exporter-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-15 19:42:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jgosmann",
    "github_project": "dmarc-metrics-exporter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dmarc-metrics-exporter"
}
        
Elapsed time: 0.34576s