Index: /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py	(revision 8637)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py	(revision 8638)
@@ -113,6 +113,9 @@
     __doc__ = u"Invalid email address"
 
+#: Regular expression to check email-address formats. As these can
+#: become rather complex (nearly everything is allowed by RFCs), we only
+#: forbid whitespaces, commas and dots following onto each other.
 check_email = re.compile(
-    r"[a-zA-Z0-9._%\-']+@([a-zA-Z0-9-]+.)*[a-zA-Z]{2,4}").match
+    r"^[^@\s,]+@[^@\.\s,]+(\.[^@\.\s,]+)*$").match
 
 def validate_email(value):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_interfaces.py	(revision 8637)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_interfaces.py	(revision 8638)
@@ -1,2 +1,3 @@
+# -*- coding: utf-8 -*-
 ## $Id$
 ##
@@ -20,6 +21,44 @@
 import grok
 import unittest
-from waeup.kofa.interfaces import DuplicationError, RoleSource
+from waeup.kofa.interfaces import DuplicationError, RoleSource, check_email
 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
+
+class RegExTests(unittest.TestCase):
+    # Let's test regular expressions here
+
+    def check(self, expression, string):
+        if expression.match(string) is not None:
+            return True
+        return False
+
+    def test_check_email_allowed(self):
+        # the RE check_email does moderate format checks, allowing
+        # also strange looking but valid email addresses
+        self.assertTrue(check_email('manfred@domain.com') is not None)
+        self.assertTrue(check_email('bob@localhost') is not None)
+        self.assertTrue(check_email('bob@h5.waeup.org') is not None)
+        self.assertTrue(check_email('bob@idn_with_ümlaut.com') is not None)
+        # also unicodes with umlauts work
+        self.assertTrue(check_email(u'bob@idn_with_ümlaut.com') is not None)
+        self.assertTrue(
+            check_email('bob_the-complex+mbox@my.place') is not None)
+        return
+
+    def test_check_email_forbidden(self):
+        # the RE check_email does moderate format checks, but doesn't
+        # accept everything.
+        # no domain at all
+        self.assertTrue(check_email('bob') is None)
+        self.assertTrue(check_email('bob@') is None)
+        # each domain part must contain at least something
+        self.assertTrue(check_email('bob@h5.waeup.') is None)
+        # whitespaces in addresses
+        self.assertTrue(check_email('spacey @domain.com') is None)
+        self.assertTrue(check_email('tabby\t@domain.com') is None)
+        # two dots next to each other in domain (empty domain part)
+        self.assertTrue(check_email('bob@some..domain') is None)
+        # commas are forbidden
+        self.assertTrue(check_email('bob@foo,alice@bar') is None)
+        return
 
 class DuplicationErrorTests(unittest.TestCase):
