diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-10-04 11:47:29 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-10-04 11:47:29 -0300 |
commit | 804de7641454677647a88b8650592e0ba415859f (patch) | |
tree | a6c9d777907510dee23a79ec476c3ccf2635d7bb /src/leap/mail/smtp | |
parent | 4012678895d045c4c43a4c89dac38430adbe3e8e (diff) | |
parent | fdf28dc83babe9b511e9c01eb5f0c79fc8fb9faa (diff) |
Merge branch 'release-0.3.4'0.3.4
Diffstat (limited to 'src/leap/mail/smtp')
-rw-r--r-- | src/leap/mail/smtp/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/leap/mail/smtp/__init__.py b/src/leap/mail/smtp/__init__.py index 2a4abc5..4e5d2a0 100644 --- a/src/leap/mail/smtp/__init__.py +++ b/src/leap/mail/smtp/__init__.py @@ -54,7 +54,7 @@ def setup_smtp_relay(port, keymanager, smtp_host, smtp_port, or not. :type encrypted_only: bool - :returns: SMTPFactory + :returns: tuple of SMTPFactory, twisted.internet.tcp.Port """ # The configuration for the SMTP relay is a dict with the following # format: @@ -77,10 +77,10 @@ def setup_smtp_relay(port, keymanager, smtp_host, smtp_port, # configure the use of this service with twistd factory = SMTPFactory(keymanager, config) try: - reactor.listenTCP(port, factory, - interface="localhost") + tport = reactor.listenTCP(port, factory, + interface="localhost") signal(proto.SMTP_SERVICE_STARTED, str(smtp_port)) - return factory + return factory, tport except CannotListenError: logger.error("STMP Service failed to start: " "cannot listen in port %s" % ( |