From 2b6e5408048a458e2c7f447e44d3829cb552a737 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Thu, 31 Jan 2013 07:36:06 +0000 Subject: Add callbacks to AliasResolverFactory, these need to be hooked to couchdb.ConnectedCouchDB(). --- src/leap/mx/alias_resolver.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/leap') diff --git a/src/leap/mx/alias_resolver.py b/src/leap/mx/alias_resolver.py index 4867893..44cb44d 100644 --- a/src/leap/mx/alias_resolver.py +++ b/src/leap/mx/alias_resolver.py @@ -221,18 +221,35 @@ class AliasResolverFactory(postfix.PostfixTCPMapDeferringDictServerFactory): if net.checkIPaddress(addr): self.addr = address._IPAddress('TCP', addr, int(port)) else: - log.debug("Using default address for Postfix: 127.0.0.1:%s" % port) + log.msg("Using default address: 127.0.0.1:%s" % port) self.addr = address._IPAddress('TCP', '127.0.0.1', int(port)) + log.msg("To configure Postfix to query this alias_resolver,") + log.msg("you should do:") + log.msg(" $ postconf -e 'check_recipient_access = tcp:%s:%d" + % (addr, port)) + def buildProtocol(self): """ - Create an instance of the :class:`PostfixAliasResolver` server. + Create an instance of the :class:`AliasResolver` server. """ proto = self.protocol() proto.timeout = self.timeout proto.factory = self return proto + def get(self, *args, **kwargs): + """ + xxx connect me to the couchdb + """ + pass + + def put(self, *args, **kwargs): + """ + xxx connect me to the couchdb + """ + pass + if __name__ == "__main__": -- cgit v1.2.3