summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/service
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-11-01 10:43:32 -0300
committerTomás Touceda <chiiph@leap.se>2013-11-01 10:43:32 -0300
commite04a13bf4dd57b18d1e627d8dabdb26f5a6531b6 (patch)
tree0b5b6e87f336674c13c2993d4e0ff1e52f658665 /src/leap/mail/imap/service
parentb13bcda9e58a65102b9de72d36b95ade7178fd2c (diff)
parentf2076cf22b889a332d497e8db0e0602bbc592336 (diff)
Merge branch 'release-0.3.6'0.3.6
Diffstat (limited to 'src/leap/mail/imap/service')
-rw-r--r--src/leap/mail/imap/service/imap.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/leap/mail/imap/service/imap.py b/src/leap/mail/imap/service/imap.py
index b840e86..5f7322a 100644
--- a/src/leap/mail/imap/service/imap.py
+++ b/src/leap/mail/imap/service/imap.py
@@ -77,7 +77,7 @@ class LeapIMAPServer(imap4.IMAP4Server):
#self.theAccount = theAccount
def lineReceived(self, line):
- if "login" in line:
+ if "login" in line.lower():
# avoid to log the pass, even though we are using a dummy auth
# by now.
msg = line[:7] + " [...]"
@@ -141,7 +141,9 @@ def run_service(*args, **kwargs):
Main entry point to run the service from the client.
:returns: the LoopingCall instance that will have to be stoppped
- before shutting down the client.
+ before shutting down the client, the port as returned by
+ the reactor when starts listening, and the factory for
+ the protocol.
"""
leap_assert(len(args) == 2)
soledad, keymanager = args
@@ -157,8 +159,8 @@ def run_service(*args, **kwargs):
from twisted.internet import reactor
try:
- reactor.listenTCP(port, factory,
- interface="localhost")
+ tport = reactor.listenTCP(port, factory,
+ interface="localhost")
fetcher = LeapIncomingMail(
keymanager,
soledad,
@@ -174,7 +176,7 @@ def run_service(*args, **kwargs):
fetcher.start_loop()
logger.debug("IMAP4 Server is RUNNING in port %s" % (port,))
leap_events.signal(IMAP_SERVICE_STARTED, str(port))
- return fetcher
+ return fetcher, tport, factory
# not ok, signal error.
leap_events.signal(IMAP_SERVICE_FAILED_TO_START, str(port))