From 6aa4e588c84579b785e49d903d0239e9ae13aba6 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 3 Sep 2013 20:35:00 +0200 Subject: Make mail services bind to 127.0.0.1 instead of 0.0.0.0 Closes: #3627 --- changes/bug_3627_listen-only-localhost | 1 + src/leap/mail/imap/service/imap.py | 3 ++- src/leap/mail/smtp/__init__.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changes/bug_3627_listen-only-localhost diff --git a/changes/bug_3627_listen-only-localhost b/changes/bug_3627_listen-only-localhost new file mode 100644 index 0000000..9376671 --- /dev/null +++ b/changes/bug_3627_listen-only-localhost @@ -0,0 +1 @@ + o Make mail services bind to 127.0.0.1. Closes: #3627 diff --git a/src/leap/mail/imap/service/imap.py b/src/leap/mail/imap/service/imap.py index 9e9a524..b840e86 100644 --- a/src/leap/mail/imap/service/imap.py +++ b/src/leap/mail/imap/service/imap.py @@ -157,7 +157,8 @@ def run_service(*args, **kwargs): from twisted.internet import reactor try: - reactor.listenTCP(port, factory) + reactor.listenTCP(port, factory, + interface="localhost") fetcher = LeapIncomingMail( keymanager, soledad, diff --git a/src/leap/mail/smtp/__init__.py b/src/leap/mail/smtp/__init__.py index cc9cc26..2a4abc5 100644 --- a/src/leap/mail/smtp/__init__.py +++ b/src/leap/mail/smtp/__init__.py @@ -77,7 +77,8 @@ 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) + reactor.listenTCP(port, factory, + interface="localhost") signal(proto.SMTP_SERVICE_STARTED, str(smtp_port)) return factory except CannotListenError: -- cgit v1.2.3