summaryrefslogtreecommitdiffstats
path: root/pykolab/plugins/recipientpolicy
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-11-16 00:52:00 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-11-16 00:52:00 +0000
commit7e1324dad409e2f9319c3347f071364f0c8f12aa (patch)
tree0154c710129ccf932f88d7250cf6abce35d87032 /pykolab/plugins/recipientpolicy
parent31405a32477129f1f8a1a916ffb90b790aaf8949 (diff)
downloadpykolab-7e1324dad409e2f9319c3347f071364f0c8f12aa.tar.gz
The recipient policy should recognize special characters in a given name or surname, and replace them with the equivalent ascii valid in an email address.
This fixes #509.
Diffstat (limited to 'pykolab/plugins/recipientpolicy')
-rw-r--r--pykolab/plugins/recipientpolicy/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pykolab/plugins/recipientpolicy/__init__.py b/pykolab/plugins/recipientpolicy/__init__.py
index ce9e9bf..07204a2 100644
--- a/pykolab/plugins/recipientpolicy/__init__.py
+++ b/pykolab/plugins/recipientpolicy/__init__.py
@@ -63,7 +63,7 @@ class KolabRecipientpolicy(object):
try:
mail = kw['primary_mail'] % user_attrs
- return mail.lower()
+ return utils.translate(mail.lower())
except KeyError, e:
log.warning(_("Attribute substitution for 'mail' failed in Recipient Policy"))
return user_attrs['mail'].lower()
@@ -105,7 +105,7 @@ class KolabRecipientpolicy(object):
log.warning(_("Attribute substitution for 'alternative_mail' failed in Recipient Policy"))
#log.debug(_("Appending additional mail address: %s") %(retval), level=8)
- alternative_mail.append(retval)
+ alternative_mail.append(utils.translate(retval))
for _domain in kw['secondary_domains']:
user_attrs['domain'] = _domain
@@ -115,7 +115,7 @@ class KolabRecipientpolicy(object):
log.warning(_("Attribute substitution for 'alternative_mail' failed in Recipient Policy"))
#log.debug(_("Appending additional mail address: %s") %(retval), level=8)
- alternative_mail.append(retval)
+ alternative_mail.append(utils.translate(retval))
alternative_mail = utils.normalize(alternative_mail)