summaryrefslogtreecommitdiffstats
path: root/pykolab/plugins/recipientpolicy
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/plugins/recipientpolicy')
-rw-r--r--pykolab/plugins/recipientpolicy/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pykolab/plugins/recipientpolicy/__init__.py b/pykolab/plugins/recipientpolicy/__init__.py
index 8dff05e..8ea2c89 100644
--- a/pykolab/plugins/recipientpolicy/__init__.py
+++ b/pykolab/plugins/recipientpolicy/__init__.py
@@ -77,9 +77,10 @@ class KolabRecipientpolicy(object):
return mail
except KeyError, e:
log.warning(_("Attribute substitution for 'mail' failed in Recipient Policy"))
- mail = utils.translate(user_attrs['mail'], user_attrs['preferredlanguage'])
- mail = mail.lower()
- return mail
+ if user_attrs.has_key('mail'):
+ return mail
+ else:
+ return None
def set_secondary_mail(self, *args, **kw):
"""