email check not rfc 822 compliant

Matthew Byng-Maddick gnupg at lists.colondot.net
Sun Nov 17 14:05:02 CET 2002


On Sat, Nov 16, 2002 at 06:40:13PM +0100, 5468696A6D656E wrote:
> The email check is not fully rfc 822 compliant.

RFC0822 is obsoleted by RFC2822.

> When i try to enter the email address:
> "this is a valid email address"@gnupg.org or

This is valid

> "this is an valid email"."using quoted strings"@gnupg.org

This is not (at least, it's a deprecated form)

[RFC2822]
[...]
| atom            =       [CFWS] 1*atext [CFWS]
| dot-atom        =       [CFWS] dot-atom-text [CFWS]
| dot-atom-text   =       1*atext *("." 1*atext)
[...]
| qcontent        =       qtext / quoted-pair
| quoted-string   =       [CFWS]
|                         DQUOTE *([FWS] qcontent) [FWS] DQUOTE
|                         [CFWS]
[...]
| local-part      =       dot-atom / quoted-string / obs-local-part

> it says it's invalid.

[...]
> 	    quoted = 0;//end of quoted string, next char *should* be a @ or .
>             if (strlen(s) < 2  || (s[1] != '@' && s[1] != '.' ))
>               return 1;

So this function doesn't implement RFC2822 properly (though I will agree
with you that it implements RFC0822 properly, but I don't think that's
useful).

Quoted strings in email addresses are just a recipe for interoperability
disaster, anyway. I know they're valid, but IME enough people don't bother
implementing them that you will run into weird interoperability problems
if you try and use them.

MBM

-- 
Matthew Byng-Maddick         <mbm at colondot.net>           http://colondot.net/




More information about the Gnupg-devel mailing list