Resolve hosts in admin

This commit is contained in:
Ionut Filip
2019-01-25 13:28:24 +02:00
committed by Tim Möhlmann
parent 004a431e97
commit f8dffe5a19
4 changed files with 17 additions and 8 deletions

View File

@@ -2,7 +2,6 @@ from mailu import models
from flask import current_app as app
import re
import socket
import urllib
@@ -89,5 +88,4 @@ def get_server(protocol, authenticated=False):
hostname, port = extract_host_port(app.config['HOST_AUTHSMTP'], 10025)
else:
hostname, port = extract_host_port(app.config['HOST_SMTP'], 25)
address = socket.gethostbyname(hostname)
return address, port
return hostname, port