diff options
author | Kali Kaneko <kali@leap.se> | 2016-04-18 12:04:34 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2016-04-18 12:04:34 -0400 |
commit | 3a25464e92acd3fb0192c2d438a2c2122ca526fd (patch) | |
tree | 531689dd646f174f3e9ce9acbdf0a621da827210 /pkg/mx.tac | |
parent | 881cab15bd331c4a8f58d13c0a4e35ebfb324442 (diff) | |
parent | e2a19eaf0ceca35acaedafb3796c66b562e825da (diff) |
Merge tag '0.8.0'
Tag leap.mx version 0.8.0
# gpg: Signature made Mon 18 Apr 2016 12:03:24 PM BOT
# gpg: using RSA key 1CAF6C5B9F720808
# gpg: Good signature from "Kaliyuga <kaliyuga@riseup.net>" [ultimate]
# gpg: aka "Kali Kaneko (leap communications) <kali@leap.se>" [ultimate]
Diffstat (limited to 'pkg/mx.tac')
-rwxr-xr-x | pkg/mx.tac | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -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) |