From 6018995534117dee01acb87525c8371c49825d07 Mon Sep 17 00:00:00 2001 From: Scott Date: Fri, 13 Apr 2018 20:04:49 -0500 Subject: [PATCH] Use POD_ADDRESS_RANGE for Dovecot if it exists This is required to override allow_nets in a Kubernetes environment where pods are not recreated with the same IP address. --- core/dovecot/conf/dovecot-sql.conf.ext | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/dovecot/conf/dovecot-sql.conf.ext b/core/dovecot/conf/dovecot-sql.conf.ext index e922d7b9..584afe55 100644 --- a/core/dovecot/conf/dovecot-sql.conf.ext +++ b/core/dovecot/conf/dovecot-sql.conf.ext @@ -3,7 +3,7 @@ connect = /data/main.db # Return the user hashed password password_query = \ - SELECT NULL as password, 'Y' as nopassword, '{{ FRONT_ADDRESS }}{% if WEBMAIL_ADDRESS %},{{ WEBMAIL_ADDRESS }}{% endif %}' as allow_nets \ + SELECT NULL as password, 'Y' as nopassword, '{% if POD_ADDRESS_RANGE %}{{ POD_ADDRESS_RANGE }}{% else %}{{ FRONT_ADDRESS }}{% if WEBMAIL_ADDRESS %},{{ WEBMAIL_ADDRESS }}{% endif %}{% endif %}' as allow_nets \ FROM user \ WHERE user.email = '%u'