From e28d5bf452b025357ae23f87ec34b8ae6897e1fd Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Wed, 23 Jan 2013 19:26:56 +0000 Subject: Updated NOTES, which contains ticket updates and tickets which need to be created, due to network availability being unreliable on airports and in planes. --- NOTES.md | 11 ++++++++++- leap/mx/alias_resolver.py | 13 +++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/NOTES.md b/NOTES.md index fd462b1..a53f49d 100644 --- a/NOTES.md +++ b/NOTES.md @@ -22,9 +22,12 @@ page](https://we.riseup.net/leap/mx) : 3. How do get it to go faster? Should we create some mockups and benchmark them? Could we attempt to learn which aliases are most often resolved and -prioritize keeping those in in-memory mappings? +prioritize keeping those in in-memory mappings? Is +[memcache](http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt) +a viable protocol for this, and how would it interact with CouchDB? 4. What lib should we use for Python + Twisted + GPG/PGP ? + 4.a. It looks like most people are using python-gnupg... ## Tickets ## @@ -48,3 +51,9 @@ ticket for feature-check_recipient: ticket for feature-virtual_alias_map: o Get the recipient's userid from couchdb. + +ticket for feature-evaluate_python_gnupg: + + o Briefly audit library in order to assess if it has the necessary + features, as well as its general code quality. + diff --git a/leap/mx/alias_resolver.py b/leap/mx/alias_resolver.py index 2263de5..1ffeb5a 100644 --- a/leap/mx/alias_resolver.py +++ b/leap/mx/alias_resolver.py @@ -7,17 +7,17 @@ Classes for resolving postfix aliases. @authors: Isis Agora Lovecruft @version: 0.0.1-beta -@license: WTFPL see included LICENSE file +@license: see included LICENSE file @copyright: copyright 2013 Isis Agora Lovecruft ''' import os from twisted.internet import address -from twisted.mail import maildir +from twisted.mail import maildir, alias from twisted.protocols import postfix -from leap.mx import net, log +from leap.mx import net, log ## xxx implement log def checkIPaddress(addr): @@ -39,6 +39,10 @@ def checkIPaddress(addr): else: return True +def query_couch(file_desc): + if not os.path.isfile (file_desc): + + class PostfixAliasResolver(postfix.PostfixTCPMapServer): """ Resolve postfix aliases, similarly to using "$ postmap -q ". @@ -89,7 +93,8 @@ class PostfixAliasResolverFactory(postfix.PostfixTCPMapDeferringDictServerFactor super(postfix.PostfixTCPMapDeferringDictServerFactory, self).__init__(data=data) self.timeout = timeout - self.noisy = False ## xxx get config value + ## xxx get config value, should be something like verbose = no + self.noisy = False try: assert isinstance(port, int), "Port number must be an integer" -- cgit v1.2.3