[Dockerapi, Dovecot] Fix missing active user filter

master
André 2018-06-20 07:25:10 +02:00
parent d3bb53c5b6
commit aa6a136c1f
3 changed files with 9 additions and 2 deletions

View File

@ -89,7 +89,8 @@ class container_post(Resource):
elif request.json['cmd'] == 'sieve_print' and request.json['script_name'] and request.json['username']:
try:
for container in docker_client.containers.list(filters={"id": container_id}):
return container.exec_run(["/bin/bash", "-c", "/usr/local/bin/doveadm sieve get -u '" + request.json['username'].replace("'", "'\\''") + "' '" + request.json['script_name'].replace("'", "'\\''") + "'"], user='vmail')
sieve_return = container.exec_run(["/bin/bash", "-c", "/usr/local/bin/doveadm sieve get -u '" + request.json['username'].replace("'", "'\\''") + "' '" + request.json['script_name'].replace("'", "'\\''") + "'"], user='vmail')
return sieve_return.output
except Exception as e:
return jsonify(type='danger', msg=str(e))
elif request.json['cmd'] == 'worker_password' and request.json['raw']:

View File

@ -303,4 +303,10 @@ service imap-postlogin {
unix_listener imap-postlogin {
}
}
service stats {
unix_listener stats-writer {
mode = 0660
user = vmail
}
}
!include_try /usr/local/etc/dovecot/extra.conf

View File

@ -372,7 +372,7 @@ services:
- watchdog
dockerapi-mailcow:
image: mailcow/dockerapi:1.11
image: mailcow/dockerapi:1.12
restart: always
build: ./data/Dockerfiles/dockerapi
sysctls: