Skip to content

Commit

Permalink
Merge pull request #2791 from modoboa/pdfcredential-v2
Browse files Browse the repository at this point in the history
added pdfcredential support for v2
  • Loading branch information
tonioo committed Feb 27, 2023
2 parents 01c381e + d83bc0c commit 0317c4c
Show file tree
Hide file tree
Showing 71 changed files with 6,632 additions and 3,123 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/modoboa.yml
Expand Up @@ -101,7 +101,7 @@ jobs:
run: |
python ./tests.py
cd test_project
python3 manage.py test modoboa.core modoboa.lib modoboa.admin modoboa.limits modoboa.transport modoboa.relaydomains modoboa.dnstools modoboa.ldapsync modoboa.policyd modoboa.maillog modoboa.parameters modoboa.dmarc
python3 manage.py test modoboa
env:
# use localhost for the host here because we are running the job on the VM.
# If we were running the job on in a container this would be postgres
Expand All @@ -117,7 +117,7 @@ jobs:
run: |
python ./tests.py
cd test_project
coverage run manage.py test modoboa.core modoboa.lib modoboa.admin modoboa.limits modoboa.transport modoboa.relaydomains modoboa.dnstools modoboa.ldapsync modoboa.policyd modoboa.maillog modoboa.parameters modoboa.dmarc
coverage run manage.py test modoboa
coverage combine
env:
# use localhost for the host here because we are running the job on the VM.
Expand Down
64 changes: 64 additions & 0 deletions doc/features/dmarc.rst
@@ -0,0 +1,64 @@
modoboa-dmarc
=============

.. _dmarcdoc:

A set of tools to use DMARC through Modoboa.

This feature 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.

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

.. note::
modoboa-installer can automatically set it up for you.

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

+-----------------+
| Debian / Ubuntu |
+=================+
| libmagic1 |
+-----------------+

+------------+
| CentOS |
+============+
| file-devel |
+------------+


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/master.cf``::

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

Define a new transport table inside ``/etc/postfix/main.cf``::

transport_maps =
hash:/etc/postfix/dmarc_transport
# 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:

.. note::
You must not declare this email address as an identity (user account or alias), else DMARC reports will be directed to your mailbox and won't be parsed.

Hash the file using the following command::

$ postmap /etc/postfix/dmarc_transport

Finally, reload postfix::

$ service postfix reload
14 changes: 14 additions & 0 deletions doc/features/pdfcredentials.rst
@@ -0,0 +1,14 @@
PDF credentials for Modoboa
===========================

.. _pdfc:

A simple `Modoboa <http://modoboa.org/>`_ extension which provides a
way to download PDF documents containing users credentials.


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

All the configuration is done from the admin panel (*Modoboa >
Parameters > PDF Credentials*).
30 changes: 21 additions & 9 deletions doc/index.rst
Expand Up @@ -16,7 +16,27 @@ Modoboa is a mail hosting and management platform including a modern
and simplified Web User Interface designed to work with `Postfix
<http://www.postfix.org>`_ and `Dovecot <http://www.dovecot.org>`_.

It is extensible by nature and comes with a lot of additional extensions:

It provides built-in features by default :


+---------------------------------------------------------+-------------------------+------------------------------------------------------+
|Name |Description |Documentation |
| | | |
| | | |
| | | |
+=========================================================+=========================+======================================================+
|modoboa-dmarc |A set of tools to use |:ref:`modoboa_dmarc Documentation <dmarcdoc>` |
| |`DMARC | |
| |<https://dmarc.org>`_ | |
+---------------------------------------------------------+-------------------------+------------------------------------------------------+
|modoboa-pdfcredentials |Generate PDF documents |:ref:`modoboa_pdfcredentials Documentation <pdfc>` |
| |containing account | |
| |credentials | |
+---------------------------------------------------------+-------------------------+------------------------------------------------------+


And it is extensible by nature and comes with a lot of additional extensions:

+---------------------------------------------------------+-------------------------+------------------------------------------------------+
|Name |Description |Documentation |
Expand All @@ -29,18 +49,10 @@ It is extensible by nature and comes with a lot of additional extensions:
| | | |
| | | |
+---------------------------------------------------------+-------------------------+------------------------------------------------------+
|`modoboa-dmarc |A set of tools to use |https://github.com/modoboa/modoboa-dmarc |
|<https://github.com/modoboa/modoboa-dmarc>`_ |`DMARC | |
| |<https://dmarc.org>`_ | |
+---------------------------------------------------------+-------------------------+------------------------------------------------------+
|`modoboa-imap-migration |Migrate mailboxes from an|https://github.com/modoboa/modoboa-imap-migration |
|<https://github.com/modoboa/modoboa-imap-migration>`_ |existing server using | |
| |IMAP (and offlineimap) | |
+---------------------------------------------------------+-------------------------+------------------------------------------------------+
|`modoboa-pdfcredentials |Generate PDF documents |https://github.com/modoboa/modoboa-pdfcredentials |
|<https://github.com/modoboa/modoboa-pdfcredentials>`_ |containing account | |
| |credentials | |
+---------------------------------------------------------+-------------------------+------------------------------------------------------+
|`modoboa-pfxadmin-migrate |A tool to migrate from |https://github.com/modoboa/modoboa-pfxadmin-migrate |
|<https://github.com/modoboa/modoboa-pfxadmin-migrate>`_ |Postfixadmin | |
+---------------------------------------------------------+-------------------------+------------------------------------------------------+
Expand Down
11 changes: 6 additions & 5 deletions doc/upgrade.rst
Expand Up @@ -111,9 +111,9 @@ Specific instructions
2.1.0
=====

The ``modoboa-dmarc`` plugin has been merged into the core.
The ``modoboa-dmarc`` and ``modoboa.pdfcredentials`` plugins have been merged into the core.

Add ``'modoboa.dmarc'`` to ``MODOBOA_APPS``:
Add ``'modoboa.dmarc'`` and ``'modoboa.pdfcredentials'`` to ``MODOBOA_APPS``:

.. sourcecode:: python

Expand All @@ -130,18 +130,19 @@ Add ``'modoboa.dmarc'`` to ``MODOBOA_APPS``:
'modoboa.policyd',
'modoboa.maillog',
'modoboa.dmarc',
'modoboa.pdfcredentials'
)

And remove any reference to ``modoboa_dmarc`` in this same variable.
And remove any reference to ``'modoboa_dmarc'`` or ``'modoboa.pdfcredentials'`` in this same variable.

FIXME: INSTALLATION django-rename-app
After upgrading modoboa, run the following commands from your virtual environment:

.. sourcecode:: bash

python manage.py rename_app modoboa_dmarc dmarc


2.0.4t
2.0.4
=====

The following modifications must be applied to the :file:`settings.py` file:
Expand Down

0 comments on commit 0317c4c

Please sign in to comment.