Skip to content

Commit ef2f5f7

Browse files
committed
[Dovecot] Use Redis ACL user quota_notify with restricted access
1 parent 743e88f commit ef2f5f7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

data/Dockerfiles/dovecot/quota_notify.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
while True:
2525
try:
26-
r = redis.StrictRedis(host='redis', decode_responses=True, port=6379, db=0, password=os.environ['REDISPASS'])
26+
r = redis.StrictRedis(host='redis', decode_responses=True, port=6379, db=0, username='quota_notify', password='')
2727
r.ping()
2828
except Exception as ex:
2929
print('%s - trying again...' % (ex))

data/conf/redis/redis-conf.sh

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
cat <<EOF > /redis.conf
44
requirepass $REDISPASS
5+
user quota_notify on nopass ~QW_* -@all +get +hget +ping
56
EOF
67

78
exec redis-server /redis.conf

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ services:
4343

4444
redis-mailcow:
4545
image: redis:7-alpine
46-
entrypoint: /redis-conf.sh
46+
entrypoint: ["/bin/sh","/redis-conf.sh"]
4747
volumes:
4848
- redis-vol-1:/data/
4949
- ./data/conf/redis/redis-conf.sh:/redis-conf.sh:z
@@ -230,7 +230,7 @@ services:
230230
- sogo
231231

232232
dovecot-mailcow:
233-
image: mailcow/dovecot:2.3
233+
image: mailcow/dovecot:2.31
234234
depends_on:
235235
- mysql-mailcow
236236
- netfilter-mailcow

0 commit comments

Comments
 (0)