mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-12-13 18:06:01 +00:00
[Dovecot] Use Redis ACL user quota_notify with restricted access
This commit is contained in:
@@ -23,7 +23,7 @@ else:
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
r = redis.StrictRedis(host='redis', decode_responses=True, port=6379, db=0, password=os.environ['REDISPASS'])
|
r = redis.StrictRedis(host='redis', decode_responses=True, port=6379, db=0, username='quota_notify', password='')
|
||||||
r.ping()
|
r.ping()
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print('%s - trying again...' % (ex))
|
print('%s - trying again...' % (ex))
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
cat <<EOF > /redis.conf
|
cat <<EOF > /redis.conf
|
||||||
requirepass $REDISPASS
|
requirepass $REDISPASS
|
||||||
|
user quota_notify on nopass ~QW_* -@all +get +hget +ping
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
exec redis-server /redis.conf
|
exec redis-server /redis.conf
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ services:
|
|||||||
|
|
||||||
redis-mailcow:
|
redis-mailcow:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
entrypoint: /redis-conf.sh
|
entrypoint: ["/bin/sh","/redis-conf.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
- redis-vol-1:/data/
|
- redis-vol-1:/data/
|
||||||
- ./data/conf/redis/redis-conf.sh:/redis-conf.sh:z
|
- ./data/conf/redis/redis-conf.sh:/redis-conf.sh:z
|
||||||
@@ -230,7 +230,7 @@ services:
|
|||||||
- sogo
|
- sogo
|
||||||
|
|
||||||
dovecot-mailcow:
|
dovecot-mailcow:
|
||||||
image: mailcow/dovecot:2.3
|
image: mailcow/dovecot:2.31
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql-mailcow
|
- mysql-mailcow
|
||||||
- netfilter-mailcow
|
- netfilter-mailcow
|
||||||
|
|||||||
Reference in New Issue
Block a user