mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-01 12:03:55 +01:00
Changed user for dkim management
This commit is contained in:
+4
-14
@@ -166,21 +166,11 @@ and add the RQ section bellow the ``#REDIS`` section:
|
|||||||
|
|
||||||
# RQ
|
# RQ
|
||||||
RQ_QUEUES = {
|
RQ_QUEUES = {
|
||||||
'default': {
|
'dkim': {
|
||||||
'HOST': REDIS_HOST,
|
'HOST': REDIS_HOST,
|
||||||
'PORT': REDIS_PORT,
|
'PORT': REDIS_PORT,
|
||||||
'DB': 0,
|
'DB': 0,
|
||||||
},
|
},
|
||||||
'high': {
|
|
||||||
'HOST': REDIS_HOST,
|
|
||||||
'PORT': REDIS_PORT,
|
|
||||||
'DB': 0,
|
|
||||||
},
|
|
||||||
'low': {
|
|
||||||
'HOST': REDIS_HOST,
|
|
||||||
'PORT': REDIS_PORT,
|
|
||||||
'DB': 0,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Then by default you will need to restart ``uwsgi`` service (``systemctl restart uwsgi`` on Debian).
|
Then by default you will need to restart ``uwsgi`` service (``systemctl restart uwsgi`` on Debian).
|
||||||
@@ -192,9 +182,9 @@ Then by default you will need to restart ``uwsgi`` service (``systemctl restart
|
|||||||
[program:modoboa-worker]
|
[program:modoboa-worker]
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
command={%python env path%} {% manage.py instance path%} rqworker high default low
|
command={%python env path%} {% manage.py instance path%} rqworker dkim
|
||||||
directory={%modoboa home dir%}
|
directory={%modoboa home dir%}
|
||||||
user=%{modoboa user}
|
user=%{dkim manager user}
|
||||||
numprocs=1
|
numprocs=1
|
||||||
stopsignal=TERM
|
stopsignal=TERM
|
||||||
|
|
||||||
@@ -204,7 +194,7 @@ You will find it here ``/srv/modoboa/venv/bin/python`` by default.
|
|||||||
You will find it here : ``/srv/modoboa/instance/manage.py``by default.
|
You will find it here : ``/srv/modoboa/instance/manage.py``by default.
|
||||||
``Modoboa home dir``: Home dir of the user running modooba.
|
``Modoboa home dir``: Home dir of the user running modooba.
|
||||||
You will find it here ``/srv/modoboa/`` by default.
|
You will find it here ``/srv/modoboa/`` by default.
|
||||||
``modoboa user`` : User owning modoboa home dir.
|
``dkim manager user`` : User managing dkim signing (opendkim by default).
|
||||||
|
|
||||||
You can help you with ``/etc/supervisor/conf.d/policyd.conf`` (by default).
|
You can help you with ``/etc/supervisor/conf.d/policyd.conf`` (by default).
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ services:
|
|||||||
DEBUG: "True"
|
DEBUG: "True"
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
command: >
|
command: >
|
||||||
sh -c "cd test_project; python3 manage.py rqworker high default low"
|
sh -c "cd test_project; python3 manage.py rqworker dkim"
|
||||||
volumes:
|
volumes:
|
||||||
- .:/code
|
- .:/code
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ def update_domain_mxs_and_mailboxes(sender, instance, **kwargs):
|
|||||||
def create_dkim_key(sender, instance, **kwargs):
|
def create_dkim_key(sender, instance, **kwargs):
|
||||||
if not instance.enable_dkim:
|
if not instance.enable_dkim:
|
||||||
return
|
return
|
||||||
django_rq.enqueue(call_command,
|
queue = django_rq.get_queue('dkim')
|
||||||
|
queue.enqueue(call_command,
|
||||||
"modo",
|
"modo",
|
||||||
"manage_dkim_keys",
|
"manage_dkim_keys",
|
||||||
f"--domain={instance.name}")
|
f"--domain={instance.name}")
|
||||||
|
|||||||
@@ -257,21 +257,11 @@ REDIS_URL = 'redis://{}:{}/{}'.format(REDIS_HOST, REDIS_PORT, REDIS_QUOTA_DB)
|
|||||||
# RQ
|
# RQ
|
||||||
|
|
||||||
RQ_QUEUES = {
|
RQ_QUEUES = {
|
||||||
'default': {
|
'dkim': {
|
||||||
'HOST': REDIS_HOST,
|
'HOST': REDIS_HOST,
|
||||||
'PORT': REDIS_PORT,
|
'PORT': REDIS_PORT,
|
||||||
'DB': 0,
|
'DB': 0,
|
||||||
},
|
},
|
||||||
'high': {
|
|
||||||
'HOST': REDIS_HOST,
|
|
||||||
'PORT': REDIS_PORT,
|
|
||||||
'DB': 0,
|
|
||||||
},
|
|
||||||
'low': {
|
|
||||||
'HOST': REDIS_HOST,
|
|
||||||
'PORT': REDIS_PORT,
|
|
||||||
'DB': 0,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Password validation
|
# Password validation
|
||||||
|
|||||||
@@ -240,15 +240,9 @@ REDIS_URL = 'redis://{}:{}/{}'.format(REDIS_HOST, REDIS_PORT, REDIS_QUOTA_DB)
|
|||||||
# RQ
|
# RQ
|
||||||
|
|
||||||
RQ_QUEUES = {
|
RQ_QUEUES = {
|
||||||
'default': {
|
'dkim': {
|
||||||
'URL': REDIS_URL,
|
'URL': REDIS_URL,
|
||||||
},
|
},
|
||||||
'high': {
|
|
||||||
'URL': REDIS_URL,
|
|
||||||
},
|
|
||||||
'low': {
|
|
||||||
'URL': REDIS_URL,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Password validation
|
# Password validation
|
||||||
|
|||||||
Reference in New Issue
Block a user