From 3aef412669128185d4cad0480355030e56122c91 Mon Sep 17 00:00:00 2001 From: andryyy Date: Thu, 31 Jan 2019 20:53:08 +0100 Subject: [PATCH] [Dovecot] Fix type of last_notification --- data/Dockerfiles/dovecot/quarantine_notify.py | 4 ++-- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/Dockerfiles/dovecot/quarantine_notify.py b/data/Dockerfiles/dovecot/quarantine_notify.py index 6d3504d1..906077fe 100755 --- a/data/Dockerfiles/dovecot/quarantine_notify.py +++ b/data/Dockerfiles/dovecot/quarantine_notify.py @@ -40,7 +40,7 @@ def query_mysql(query, headers = True, update = False): result = [] columns = tuple( [d[0].decode('utf8') for d in cur.description] ) for row in cur: - if headers: + if headers: result.append(dict(zip(columns, row))) else: result.append(row) @@ -94,7 +94,7 @@ def notify_rcpt(rcpt, msg_count): records = query_mysql('SELECT count(id) AS counter, rcpt FROM quarantine WHERE notified = 0 GROUP BY rcpt') for record in records: - last_notification = int(r.hget('Q_LAST_NOTIFIED', record['rcpt'])) or 0 + last_notification = int(r.hget('Q_LAST_NOTIFIED', record['rcpt']) or 0) attrs_json = query_mysql('SELECT attributes FROM mailbox WHERE username = "%s"' % (record['rcpt'])) attrs = json.loads(str(attrs_json[0]['attributes'])) if attrs['quarantine_notification'] == 'hourly': diff --git a/docker-compose.yml b/docker-compose.yml index a198cbe1..cc0c396a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -164,7 +164,7 @@ services: - sogo dovecot-mailcow: - image: mailcow/dovecot:1.56 + image: mailcow/dovecot:1.57 build: ./data/Dockerfiles/dovecot cap_add: - NET_BIND_SERVICE