This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 0c557879739c4deb6651abe271c37e05b6c5807e
Author: Benoit Tellier <[email protected]>
AuthorDate: Sun Jan 30 12:15:29 2022 +0700

    JAMES-3708 Tests for valid/invalid mail address values on the wikipedia page
---
 .../java/org/apache/james/core/MailAddressTest.java  | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/core/src/test/java/org/apache/james/core/MailAddressTest.java 
b/core/src/test/java/org/apache/james/core/MailAddressTest.java
index 4c8624f..a00a789 100644
--- a/core/src/test/java/org/apache/james/core/MailAddressTest.java
+++ b/core/src/test/java/org/apache/james/core/MailAddressTest.java
@@ -49,7 +49,14 @@ class MailAddressTest {
                 "[email protected]",
                 "server-dev@[127.0.0.1]",
                 "[email protected]",
-                "\\[email protected]")
+                "\\[email protected]",
+                "[email protected]",
+                "[email protected]",
+                "user+mailbox/[email protected]",
+                "\"Abc@def\"@example.com",
+                "\"Fred Bloggs\"@example.com",
+                "\"Joe.\\Blow\"@example.com",
+                "!#$%&'*+-/=?^_`.{|}[email protected]")
             .map(Arguments::of);
     }
 
@@ -86,7 +93,16 @@ class MailAddressTest {
                 "server-dev@[127.0.1.-1]",
                 "\"a..b\"@domain.com", // Javax.mail is unable to handle this 
so we better reject it
                 "server-dev\\[email protected]", // Javax.mail is unable to 
handle this so we better reject it
-                "[email protected]")
+                "[email protected]",
+                // According to wikipedia these addresses are valid but as 
javax.mail is unable
+                // to work with thenm we shall rather reject them (note that 
this is not breaking retro-compatibility)
+                "Loïc.Accentué@voilà.fr8",
+                "pelé@exemple.com",
+                "δοκιμή@παράδειγμα.δοκιμή",
+                "我買@屋企.香港",
+                "二ノ宮@黒川.日本",
+                "медведь@с-балалайкой.рф",
+                "संपर्क@डाटामेल.भारत")
             .map(Arguments::of);
     }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to