summaryrefslogtreecommitdiff
path: root/src/leap/mail/smtp
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-08-21 15:14:09 -0300
committerTomás Touceda <chiiph@leap.se>2013-08-21 15:14:09 -0300
commit1386a8644b1c215b403bc17745fbac4549a76226 (patch)
tree15e4270a5e7993157047636c4561f367398b9d9e /src/leap/mail/smtp
parent96be9573319456869c76de59b59e309a75fd15a6 (diff)
parent732923cc59a909b45f5af970702bf299b8d607a5 (diff)
Merge remote-tracking branch 'kali/feature/add_debug_errors' into develop
Diffstat (limited to 'src/leap/mail/smtp')
-rw-r--r--src/leap/mail/smtp/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/leap/mail/smtp/__init__.py b/src/leap/mail/smtp/__init__.py
index 54f5c81..d5d61bf 100644
--- a/src/leap/mail/smtp/__init__.py
+++ b/src/leap/mail/smtp/__init__.py
@@ -18,10 +18,12 @@
"""
SMTP relay helper function.
"""
+import logging
from twisted.internet import reactor
from twisted.internet.error import CannotListenError
+logger = logging.getLogger(__name__)
from leap.common.events import proto, signal
from leap.mail.smtp.smtprelay import SMTPFactory
@@ -76,4 +78,7 @@ def setup_smtp_relay(port, keymanager, smtp_host, smtp_port,
reactor.listenTCP(port, factory)
signal(proto.SMTP_SERVICE_STARTED, str(smtp_port))
except CannotListenError:
+ logger.error("STMP Service failed to start: "
+ "cannot listen in port %s" % (
+ smtp_port,))
signal(proto.SMTP_SERVICE_FAILED_TO_START, str(smtp_port))