Index: src/main/java/org/apache/mailet/MailAddress.java
===================================================================
--- src/main/java/org/apache/mailet/MailAddress.java	(revision 562233)
+++ src/main/java/org/apache/mailet/MailAddress.java	(working copy)
@@ -114,18 +114,21 @@
             if (address.charAt(pos) == '\"') {
                 userSB.append(parseQuotedLocalPart(address));
                 if (userSB.toString().length() == 2) {
-                    throw new ParseException("No quoted local-part (user account) found at position " + (pos + 2));
+                    throw new ParseException("No quoted local-part (user account) found at position " 
+                            + (pos + 2) + " in '" + address + "'");
                 }
             } else {
                 userSB.append(parseUnquotedLocalPart(address));
                 if (userSB.toString().length() == 0) {
-                    throw new ParseException("No local-part (user account) found at position " + (pos + 1));
+                    throw new ParseException("No local-part (user account) found at position " 
+                            + (pos + 1) + " in '" + address + "'");
                 }
             }
 
             //find @
             if (pos >= address.length() || address.charAt(pos) != '@') {
-                throw new ParseException("Did not find @ between local-part and domain at position " + (pos + 1));
+                throw new ParseException("Did not find @ between local-part and domain at position " 
+                        + (pos + 1) + " in '" + address + "'");
             }
             pos++;
 
@@ -152,10 +155,12 @@
             }
 
             if (hostSB.toString().length() == 0) {
-                throw new ParseException("No domain found at position " + (pos + 1));
+                throw new ParseException("No domain found at position " 
+                        + (pos + 1) + " in '" + address + "'");
             }
         } catch (IndexOutOfBoundsException ioobe) {
-            throw new ParseException("Out of data at position " + (pos + 1));
+            throw new ParseException("Out of data at position " 
+                    + (pos + 1) + " in '" + address + "'");
         }
 
         user = userSB.toString();
@@ -239,7 +244,8 @@
             return toString().equalsIgnoreCase(theString);
         } else if (obj instanceof MailAddress) {
             MailAddress addr = (MailAddress)obj;
-            return getUser().equalsIgnoreCase(addr.getUser()) && getHost().equalsIgnoreCase(addr.getHost());
+            return getUser().equalsIgnoreCase(addr.getUser()) 
+                && getHost().equalsIgnoreCase(addr.getHost());
         }
         return false;
     }
@@ -276,7 +282,8 @@
                 //<x> ::= any one of the 128 ASCII characters (no exceptions)
                 char x = address.charAt(pos);
                 if (x < 0 || x > 127) {
-                    throw new ParseException("Invalid \\ syntaxed character at position " + (pos + 1));
+                    throw new ParseException("Invalid \\ syntaxed character at position " 
+                            + (pos + 1) + " in '" + address + "'");
                 }
                 resultSB.append(x);
                 pos++;
@@ -285,7 +292,8 @@
                 //<LF>, quote ("), or backslash (\)
                 char q = address.charAt(pos);
                 if (q <= 0 || q == '\n' || q == '\r' || q == '\"' || q == '\\') {
-                    throw new ParseException("Unquoted local-part (user account) must be one of the 128 ASCI characters exception <CR>, <LF>, quote (\"), or backslash (\\) at position " + (pos + 1));
+                    throw new ParseException("Unquoted local-part (user account) must be one of the 128 ASCI characters exception <CR>, <LF>, quote (\"), or backslash (\\) at position " 
+                            + (pos + 1) + " in '" + address + "'");
                 }
                 resultSB.append(q);
                 pos++;
@@ -307,7 +315,8 @@
                 //<x> ::= any one of the 128 ASCII characters (no exceptions)
                 char x = address.charAt(pos);
                 if (x < 0 || x > 127) {
-                    throw new ParseException("Invalid \\ syntaxed character at position " + (pos + 1));
+                    throw new ParseException("Invalid \\ syntaxed character at position " 
+                            + (pos + 1) + " in '" + address + "'");
                 }
                 resultSB.append(x);
                 pos++;
@@ -329,11 +338,13 @@
                 //<SP> ::= the space character (ASCII code 32)
                 char c = address.charAt(pos);
                 if (c <= 31 || c >= 127 || c == ' ') {
-                    throw new ParseException("Invalid character in local-part (user account) at position " + (pos + 1));
+                    throw new ParseException("Invalid character in local-part (user account) at position " 
+                            + (pos + 1) + " in '" + address + "'");
                 }
                 for (int i = 0; i < SPECIAL.length; i++) {
                     if (c == SPECIAL[i]) {
-                        throw new ParseException("Invalid character in local-part (user account) at position " + (pos + 1));
+                        throw new ParseException("Invalid character in local-part (user account) at position " 
+                                + (pos + 1) + " in '" + address + "'");
                     }
                 }
                 resultSB.append(c);
@@ -342,7 +353,8 @@
             }
         }
         if (lastCharDot) {
-            throw new ParseException("local-part (user account) ended with a \".\", which is invalid.");
+            throw new ParseException("local-part (user account) ended with a \".\", which is invalid. Address '" 
+                    + address + "'");
         }
         return resultSB.toString();
     }
@@ -362,7 +374,8 @@
                 break;
             }
             if (d < '0' || d > '9') {
-                throw new ParseException("In domain, did not find a number in # address at position " + (pos + 1));
+                throw new ParseException("In domain, did not find a number in # address at position " 
+                        + (pos + 1)  + " in '" + address + "'");
             }
             resultSB.append(d);
             pos++;
@@ -371,9 +384,11 @@
     }
 
     private String parseDotNum(String address) throws ParseException {
-        //throw away all irrelevant '\' they're not necessary for escaping of '.' or digits, and are illegal as part of the domain-literal
+        // throw away all irrelevant '\' they're not necessary for escaping of '.' or digits, 
+        // and are illegal as part of the domain-literal
         while(address.indexOf("\\")>-1){
-             address= address.substring(0,address.indexOf("\\")) + address.substring(address.indexOf("\\")+1);
+             address= address.substring(0,address.indexOf("\\")) 
+                 + address.substring(address.indexOf("\\")+1);
         }
         StringBuffer resultSB = new StringBuffer();
         //we were passed the string with pos pointing the the [ char.
@@ -396,26 +411,31 @@
                     break;
                 }
                 if (d < '0' || d > '9') {
-                    throw new ParseException("Invalid number at position " + (pos + 1));
+                    throw new ParseException("Invalid number at position " 
+                            + (pos + 1) + " in '" + address + "'");
                 }
                 snumSB.append(d);
                 pos++;
             }
             if (snumSB.toString().length() == 0) {
-                throw new ParseException("Number not found at position " + (pos + 1));
+                throw new ParseException("Number not found at position " 
+                        + (pos + 1) + " in '" + address + "'");
             }
             try {
                 int snum = Integer.parseInt(snumSB.toString());
                 if (snum > 255) {
-                    throw new ParseException("Invalid number at position " + (pos + 1));
+                    throw new ParseException("Invalid number at position " 
+                            + (pos + 1) + " in '" + address + "'");
                 }
             } catch (NumberFormatException nfe) {
-                throw new ParseException("Invalid number at position " + (pos + 1));
+                throw new ParseException("Invalid number at position " 
+                        + (pos + 1) + " in '" + address + "'");
             }
             resultSB.append(snumSB.toString());
             if (address.charAt(pos) == ']') {
                 if (octet < 3) {
-                    throw new ParseException("End of number reached too quickly at " + (pos + 1));
+                    throw new ParseException("End of number reached too quickly at " 
+                            + (pos + 1) + " in '" + address + "'");
                 } else {
                     break;
                 }
@@ -426,7 +446,8 @@
             }
         }
         if (address.charAt(pos) != ']') {
-            throw new ParseException("Did not find closing bracket \"]\" in domain at position " + (pos + 1));
+            throw new ParseException("Did not find closing bracket \"]\" in domain at position " 
+                    + (pos + 1) + " in '" + address + "'");
         }
         resultSB.append(']');
         pos++;
@@ -470,7 +491,8 @@
         }
         String result = resultSB.toString();
         if (result.startsWith("-") || result.endsWith("-")) {
-            throw new ParseException("Domain name cannot begin or end with a hyphen \"-\" at position " + (pos + 1));
+            throw new ParseException("Domain name cannot begin or end with a hyphen \"-\" at position " 
+                    + (pos + 1) + " in '" + address + "'");
         }
         return result;
     }
