Add IPv6 to allow_nets

Roundcube was not connecting to sieve with IPv6 enabled.

Fixes #1336
master
Philip Rosenberg-Watt 5 years ago
parent b248f6a800
commit 27e37577c6

@ -67,6 +67,7 @@ DEFAULT_CONFIG = {
'HOST_REDIS': 'redis', 'HOST_REDIS': 'redis',
'HOST_FRONT': 'front', 'HOST_FRONT': 'front',
'SUBNET': '192.168.203.0/24', 'SUBNET': '192.168.203.0/24',
'SUBNET6': None,
'POD_ADDRESS_RANGE': None 'POD_ADDRESS_RANGE': None
} }

@ -11,6 +11,8 @@ def dovecot_passdb_dict(user_email):
user = models.User.query.get(user_email) or flask.abort(404) user = models.User.query.get(user_email) or flask.abort(404)
allow_nets = [] allow_nets = []
allow_nets.append(app.config["SUBNET"]) allow_nets.append(app.config["SUBNET"])
if app.config["SUBNET6"]:
allow_nets.append(app.config["SUBNET6"])
if app.config["POD_ADDRESS_RANGE"]: if app.config["POD_ADDRESS_RANGE"]:
allow_nets.append(app.config["POD_ADDRESS_RANGE"]) allow_nets.append(app.config["POD_ADDRESS_RANGE"])
return flask.jsonify({ return flask.jsonify({

Loading…
Cancel
Save