summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-09-03 15:38:27 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-09-03 15:38:27 -0300
commit70e84d6af7efe564f82fe4705d49bdb9f79c3dca (patch)
tree4e8c781bf913d1d966af24a6d90d02bf58750d78 /mail
parente2f52f12da87e64edf6fa280f9d8dabc71bd8602 (diff)
parentad2d2dc1a18104abd1eeb5feeef4e92dac7c25f5 (diff)
Merge remote-tracking branch 'kali/bug/listen-only-localhost' into develop
Diffstat (limited to 'mail')
-rw-r--r--mail/changes/bug_3627_listen-only-localhost1
-rw-r--r--mail/src/leap/mail/imap/service/imap.py3
-rw-r--r--mail/src/leap/mail/smtp/__init__.py3
3 files changed, 5 insertions, 2 deletions
diff --git a/mail/changes/bug_3627_listen-only-localhost b/mail/changes/bug_3627_listen-only-localhost
new file mode 100644
index 00000000..9376671b
--- /dev/null
+++ b/mail/changes/bug_3627_listen-only-localhost
@@ -0,0 +1 @@
+ o Make mail services bind to 127.0.0.1. Closes: #3627
diff --git a/mail/src/leap/mail/imap/service/imap.py b/mail/src/leap/mail/imap/service/imap.py
index 9e9a524f..b840e864 100644
--- a/mail/src/leap/mail/imap/service/imap.py
+++ b/mail/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/mail/src/leap/mail/smtp/__init__.py b/mail/src/leap/mail/smtp/__init__.py
index cc9cc263..2a4abc57 100644
--- a/mail/src/leap/mail/smtp/__init__.py
+++ b/mail/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: