mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Added documentation.
This commit is contained in:
@@ -204,5 +204,38 @@ following content inside::
|
||||
# Generate DKIM keys (they will belong to the user running this job)
|
||||
* * * * * root umask 077 && $PYTHON $INSTANCE/manage.py modo manage_dkim_keys
|
||||
|
||||
.. _policy_daemon:
|
||||
|
||||
Policy daemon
|
||||
-------------
|
||||
|
||||
Modoboa comes with a built-in `Policy Daemon for Postfix <http://www.postfix.org/SMTPD_POLICY_README.html>`_. Current features are:
|
||||
|
||||
* Define daily sending limits for domains and/or accounts
|
||||
|
||||
A `redis server <https://redis.io/>`_ is required to run this new daemon.
|
||||
|
||||
You can launch it manually using the following command:
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
(env)> python manage.py policy_daemon
|
||||
|
||||
But we recommend an automatic start using ``systemd`` or
|
||||
``supervisor``. Here is a configuration example for ``supervisor``:
|
||||
|
||||
.. sourcecode:: ini
|
||||
|
||||
[program:policyd]
|
||||
autostart=true
|
||||
autorestart=true
|
||||
command=/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py policy_daemon
|
||||
directory=/srv/modoboa
|
||||
redirect_stderr=true
|
||||
user=modoboa
|
||||
numprocs=1
|
||||
|
||||
It will listen by default on ``127.0.0.1`` and port ``9999``. The
|
||||
policy daemon won't do anything unless you tell :ref:`postfix <policyd_config>` to use it.
|
||||
|
||||
Now you can continue to the :ref:`webserver` section.
|
||||
|
||||
@@ -65,3 +65,23 @@ Use the following configuration in the :file:`/etc/postfix/main.cf` file
|
||||
Replace ``<driver>`` by the name of the database you use.
|
||||
|
||||
Restart Postfix.
|
||||
|
||||
.. _policyd_config:
|
||||
|
||||
Policy daemon
|
||||
-------------
|
||||
|
||||
If you want to enable the built-in policy daemon, add the following
|
||||
content to the :file:`/etc/postfix/main.cf` file::
|
||||
|
||||
smtpd_recipient_restrictions =
|
||||
# ...
|
||||
check_policy_service inet:127.0.0.1:9999
|
||||
# ...
|
||||
|
||||
And reload postfix.
|
||||
|
||||
.. note::
|
||||
|
||||
The ``check_policy_service`` line must be placed before the
|
||||
``permit_mynetworks`` one, otherwise the daemon won't be called.
|
||||
|
||||
@@ -91,6 +91,20 @@ Rebuild Virtual Environment
|
||||
Specific instructions
|
||||
*********************
|
||||
|
||||
1.16.0
|
||||
======
|
||||
|
||||
A new :ref:`policy daemon <policy_daemon>` has been added. Make sure
|
||||
to have a Redis instance running on your server, then add the following
|
||||
settings to your ``settings.py`` file:
|
||||
|
||||
.. sourcecode:: python
|
||||
|
||||
REDIS_HOST = '<IP or hostname here>'
|
||||
REDIS_PORT = 6379
|
||||
REDIS_QUOTA_DB = 0
|
||||
REDIS_URL = 'redis://{}:{}/{}'.format(REDIS_HOST, REDIS_PORT, REDIS_QUOTA_DB)
|
||||
|
||||
1.15.0
|
||||
======
|
||||
|
||||
|
||||
Reference in New Issue
Block a user