path: root/pykolab/
diff options
authorJeroen van Meeuwen (Kolab Systems) <>2011-11-16 00:52:00 +0000
committerJeroen van Meeuwen (Kolab Systems) <>2011-11-16 00:52:00 +0000
commit7e1324dad409e2f9319c3347f071364f0c8f12aa (patch)
tree0154c710129ccf932f88d7250cf6abce35d87032 /pykolab/
parent31405a32477129f1f8a1a916ffb90b790aaf8949 (diff)
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/')
1 files changed, 8 insertions, 0 deletions
diff --git a/pykolab/ b/pykolab/
index d787eab..079a48c 100644
--- a/pykolab/
+++ b/pykolab/
@@ -207,6 +207,14 @@ def pop_empty_from_list(_input_list):
def standard_root_dn(domain):
return 'dc=%s' %(',dc='.join(domain.split('.')))
+def translate(mystring):
+ chars = ['Ä', 'Ü', 'Ö', 'ä', 'ü', 'ö', 'ß']
+ simple = ['Ae', 'Ue', 'Oe', 'ae', 'ue', 'oe', 'ss']
+ for num in range(0, len(chars)):
+ mystring = mystring.replace(chars[num], simple[num])
+ return mystring
def is_service(services):
Checks each item in list services to see if it has a RC script in