summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsis Lovecruft <isis@torproject.org>2013-01-23 19:26:56 +0000
committerIsis Lovecruft <isis@torproject.org>2013-01-23 19:26:56 +0000
commite28d5bf452b025357ae23f87ec34b8ae6897e1fd (patch)
treeb6865b6c76853d3ba11d1633c5feb91a381897bd
parent6af8264dfbcaf88be2fb19928f5c5b8f0f78d7cc (diff)
Updated NOTES, which contains ticket updates and tickets which need to be
created, due to network availability being unreliable on airports and in planes.
-rw-r--r--NOTES.md11
-rw-r--r--leap/mx/alias_resolver.py13
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 <alias>".
@@ -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"