summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/mail/smtp/service.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-12-16 21:04:01 +0200
committerKali Kaneko <kali@leap.se>2017-12-22 20:03:30 +0100
commit90503627ef5047cd7e6e253266f0b25f2b1daa4d (patch)
treec4e5908db4d5e81e97a4d0f920af7ef44b5ab971 /src/leap/bitmask/mail/smtp/service.py
parentf4a3c23be148a822352d484c263ead0e4fd2b907 (diff)
[refactor] Use sender interface in outgoing service
Diffstat (limited to 'src/leap/bitmask/mail/smtp/service.py')
-rw-r--r--src/leap/bitmask/mail/smtp/service.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/leap/bitmask/mail/smtp/service.py b/src/leap/bitmask/mail/smtp/service.py
index 6fd000ce..788b2791 100644
--- a/src/leap/bitmask/mail/smtp/service.py
+++ b/src/leap/bitmask/mail/smtp/service.py
@@ -31,16 +31,15 @@ log = Logger()
SMTP_PORT = 2013
-def run_service(soledad_sessions, keymanager_sessions, sendmail_opts,
- port=SMTP_PORT, factory=None):
+def run_service(outgoing_sessions, soledad_sessions, port=SMTP_PORT,
+ factory=None):
"""
Main entry point to run the service from the client.
+ :param outgoing_sessions: a dict-like object, containing instances
+ of outgoing, indexed by userid.
:param soledad_sessions: a dict-like object, containing instances
of a Store (soledad instances), indexed by userid.
- :param keymanager_sessions: a dict-like object, containing instances
- of Keymanager, indexed by userid.
- :param sendmail_opts: a dict-like object of sendmailOptions.
:param factory: a factory for the protocol that will listen in the given
port
@@ -49,8 +48,7 @@ def run_service(soledad_sessions, keymanager_sessions, sendmail_opts,
:rtype: tuple
"""
if not factory:
- factory = SMTPFactory(soledad_sessions, keymanager_sessions,
- sendmail_opts)
+ factory = SMTPFactory(outgoing_sessions, soledad_sessions)
try:
interface = "localhost"