diff options
Diffstat (limited to 'src/leap/mx/check_recipient_access.py')
-rw-r--r-- | src/leap/mx/check_recipient_access.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/leap/mx/check_recipient_access.py b/src/leap/mx/check_recipient_access.py index 1b44504..0520c7c 100644 --- a/src/leap/mx/check_recipient_access.py +++ b/src/leap/mx/check_recipient_access.py @@ -18,6 +18,8 @@ """ Classes for resolving postfix recipient access + +Test this with postmap -v -q "foo" tcp:localhost:2244 """ from twisted.protocols import postfix @@ -25,13 +27,14 @@ from twisted.protocols import postfix from leap.mx.alias_resolver import AliasResolverFactory -class CheckRecipientAccess(postfix.PostfixTCPMapServer): +class LEAPPostFixTCPMapserverAccess(postfix.PostfixTCPMapServer): def _cbGot(self, value): if value is None: - self.sendCode(500) + self.sendCode(500, postfix.quote("NOT FOUND SORRY")) else: + # We do not send the value in this case self.sendCode(200) class CheckRecipientAccessFactory(AliasResolverFactory): - protocol = CheckRecipientAccess + protocol = LEAPPostFixTCPMapserverAccess |