From 5fa2aac56945ddaf72323ffff49ae5bbea2c0f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Wed, 31 Oct 2018 17:47:05 +0200 Subject: [PATCH] Fix imap login when no webmail selected --- core/admin/mailu/internal/views/dovecot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/admin/mailu/internal/views/dovecot.py b/core/admin/mailu/internal/views/dovecot.py index 036140f0..e6e4c10f 100644 --- a/core/admin/mailu/internal/views/dovecot.py +++ b/core/admin/mailu/internal/views/dovecot.py @@ -3,7 +3,7 @@ from mailu.internal import internal import flask import socket - +import os @internal.route("/dovecot/passdb/") def dovecot_passdb_dict(user_email): @@ -13,7 +13,8 @@ def dovecot_passdb_dict(user_email): app.config.get("POD_ADDRESS_RANGE") or socket.gethostbyname(app.config["HOST_FRONT"]) ) - allow_nets.append(socket.gethostbyname(app.config["HOST_WEBMAIL"])) + if os.environ["WEBMAIL"] != "none": + allow_nets.append(socket.gethostbyname(app.config["HOST_WEBMAIL"])) print(allow_nets) return flask.jsonify({ "password": None,