summaryrefslogtreecommitdiff
path: root/pkg/mx.tac
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/mx.tac')
-rwxr-xr-xpkg/mx.tac27
1 files changed, 17 insertions, 10 deletions
diff --git a/pkg/mx.tac b/pkg/mx.tac
index 7da59cf..42d40a8 100755
--- a/pkg/mx.tac
+++ b/pkg/mx.tac
@@ -24,6 +24,7 @@ from leap.mx import couchdbhelper
from leap.mx.mail_receiver import MailReceiver
from leap.mx.alias_resolver import AliasResolverFactory
from leap.mx.check_recipient_access import CheckRecipientAccessFactory
+from leap.mx.fingerprint_resolver import FingerprintResolverFactory
try:
from twisted.application import service, internet
@@ -57,6 +58,7 @@ except ConfigParser.NoSectionError:
alias_port = config.getint("alias map", "port")
check_recipient_port = config.getint("check recipient", "port")
+fingerprint_port = config.getint("fingerprint map", "port")
cdb = couchdbhelper.ConnectedCouchDB(server,
port=port,
@@ -68,27 +70,32 @@ cdb = couchdbhelper.ConnectedCouchDB(server,
application = service.Application("LEAP MX")
# Alias map
-alias_map = internet.TCPServer(alias_port, AliasResolverFactory(couchdb=cdb))
+alias_map = internet.TCPServer(
+ alias_port, AliasResolverFactory(couchdb=cdb),
+ interface="localhost")
alias_map.setServiceParent(application)
# Check recipient access
-check_recipient = internet.TCPServer(check_recipient_port,
- CheckRecipientAccessFactory(couchdb=cdb))
+check_recipient = internet.TCPServer(
+ check_recipient_port, CheckRecipientAccessFactory(couchdb=cdb),
+ interface="localhost")
check_recipient.setServiceParent(application)
+# Fingerprint map
+fingerprint_map = internet.TCPServer(
+ fingerprint_port, FingerprintResolverFactory(couchdb=cdb),
+ interface="localhost")
+fingerprint_map.setServiceParent(application)
+
# Mail receiver
-mail_couch_url_prefix = "http://%s:%s@%s:%s" % (user,
- password,
- server,
- port)
directories = []
for section in config.sections():
- if section in ("couchdb", "alias map", "check recipient", "bounce"):
+ if section in ("couchdb", "alias map", "check recipient",
+ "fingerprint map", "bounce"):
continue
to_watch = config.get(section, "path")
recursive = config.getboolean(section, "recursive")
directories.append([to_watch, recursive])
-mr = MailReceiver(mail_couch_url_prefix, cdb, directories, bounce_from,
- bounce_subject)
+mr = MailReceiver(cdb, directories, bounce_from, bounce_subject)
mr.setServiceParent(application)