<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dominic Sayers &#187; rfc2822</title>
	<atom:link href="http://blog.dominicsayers.com/tag/rfc2822/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dominicsayers.com</link>
	<description></description>
	<lastBuildDate>Tue, 31 Aug 2010 09:12:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<atom:link rel='hub' href='http://blog.dominicsayers.com/?pushpress=hub'/>
		<item>
		<title>What does a double colon mean in IPv6 addresses?</title>
		<link>http://blog.dominicsayers.com/2010/08/24/what-does-a-double-colon-mean-in-ipv6-addresses/</link>
		<comments>http://blog.dominicsayers.com/2010/08/24/what-does-a-double-colon-mean-in-ipv6-addresses/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 11:42:46 +0000</pubDate>
		<dc:creator>Dominic</dc:creator>
				<category><![CDATA[Email address validation]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[ietf]]></category>
		<category><![CDATA[rfc2821]]></category>
		<category><![CDATA[rfc2822]]></category>
		<category><![CDATA[rfc3696]]></category>
		<category><![CDATA[rfc4291]]></category>
		<category><![CDATA[rfc5322]]></category>
		<category><![CDATA[rfc5952]]></category>
		<category><![CDATA[rfc822]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://blog.dominicsayers.com/?p=521</guid>
		<description><![CDATA[My conclusion is this: my own validator is_email() will accept as valid any address that conforms to RFC 4291 (even though that is contradicted by RFC 5321). It will raise a warning if the double colon elides only one zero group.]]></description>
			<content:encoded><![CDATA[<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
<p>This is a post for IPv6 geeks and people who care about email address validation. That&#8217;s probably not you, so I&#8217;m warning you that it gets a bit nerdy below. YHBW.</p>
<p>People keep saying the IPv4 address space is going to run out Real Soon Now but it&#8217;s still the protocol you are using right now to connect to the internet. It&#8217;s still working. When I was at school many years ago, I was told that oil would probably run out before the year 2000. People who believed this started investing in Alternative Energy such as solar power, wind power and, least successful of all, wave power. Most of the early investors lost their money, I guess.</p>
<p>The Alternative Energy of the internet is IPv6. This is the solution that people designed when they first thought the IPv4 address space was in danger of running out. It&#8217;s still a minority sport even though your Windows PC has it installed and running. It&#8217;s talking this language to nobody though. Even if you have a few computers at your house, the router you use to network them together is still only talking IPv4.</p>
<p>IPv6 is there and it&#8217;s real. One day we might start using it. Until then it remains a laboratory curiosity.</p>
<p>But it&#8217;s a valid part of an email address. So if you want to validate somebody&#8217;s email address in your registration form you shouldn&#8217;t go rejecting <em>jon.postel@[IPv6:1234::cdef]</em> just because it doesn&#8217;t match the usual <em>first.last@domain.com</em> format. It&#8217;s a valid address. Check out <a href="http://tools.ietf.org/html/rfc5321" target="_blank">RFC 5321</a> if you don&#8217;t believe me.</p>
<p>OK, let&#8217;s assume you actually clicked that link and read the RFC (I won&#8217;t tell if you don&#8217;t).</p>
<p>Now tell me whether this is a valid address: <em>jon.postel@[IPv6:1111:2222:3333:4444:5555::7777:8888]</em></p>
<p>The answer according to the bible of SMTP is <strong>no</strong>. I quote the comments to the definition of ipv6-comp: &#8220;<span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px;">The &#8220;::&#8221; represents at least 2 16-bit groups of zeros.  No more than 6 groups in addition to the &#8220;::&#8221; may be present.</span>&#8221;</p>
<p>But let&#8217;s look at the bible of <strong>IPv6</strong>, <a href="http://tools.ietf.org/html/rfc4291" target="_blank">RFC 4291</a>: &#8220;<span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px;">The use of &#8220;::&#8221; indicates one or more groups of 16 bits of zeros.</span>&#8221;</p>
<p>So RFC 4291 appears to disagree with RFC 5321. Thanks, IETF. Which should we use as our authority when validating email addresses? Perhaps RFC 5321 is documenting a <em>special case</em> of IPv6 that only applies to SMTP transactions. Hmmm.</p>
<p>Fortunately just when we feel like banging John Klensin&#8217;s head against RFC 4291 or (frankly) anything solid, along come Seiichi Kawamura and Masanobu Kawashima to our rescue. The brand-new <a href="http://tools.ietf.org/html/rfc5952" target="_blank">RFC 5952</a> gives us clear guidelines about the use of the double colon in IPv6 addresses:</p>
<blockquote><p>
<em>The symbol &#8220;::&#8221; MUST NOT be used to shorten just one 16-bit 0 field.</em>
</p></blockquote>
<p>Phew. We have clarity at last.</p>
<p>Or do we?</p>
<p>Remember Jon Postel&#8217;s <a href="http://en.wikipedia.org/wiki/Robustness_principle" target="_blank">Robustness Principle</a>? &#8220;Be conservative in what you do, be liberal in what you accept from others&#8221;. How might we apply that here? RFC 5952 still accepts the authority of RFC 4291. It is a <em>recommendation</em> for how IPv6 addresses might be standardised when written as text. The robustness principle would suggest we should ensure our own addresses conform to RFC 5952, but we should accept any addresses that conform to RFC 4291.</p>
<p>My conclusion is this: my own validator <em><a href="http://code.google.com/p/isemail/source/browse/trunk" target="_blank">is_email()</a></em> will accept as valid any address that conforms to RFC 4291 (even though that is contradicted by RFC 5321). It will raise a warning if the double colon elides only one zero group.</p>
<p>As a final personal note, I would say that an address of the format <em>::1111:2222:3333:4444:5555:6666:7777</em> is nonsense. It&#8217;s valid according to RFC 4291 but it contains 8 colons. That&#8217;s just silly. I think it&#8217;s clear that the only sensible use of the double colon is to elide two or more zero groups and I certainly agree with RFC 5952 that that should be the standard.</p>
<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
<p>Thanks to my correspondent <a href="mailto:michael@squiloople.com">Michael Rushton</a> for bringing my attention to this issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dominicsayers.com/2010/08/24/what-does-a-double-colon-mean-in-ipv6-addresses/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Email validation version 2.1</title>
		<link>http://blog.dominicsayers.com/2010/08/18/email-validation-version-2-1/</link>
		<comments>http://blog.dominicsayers.com/2010/08/18/email-validation-version-2-1/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 13:46:49 +0000</pubDate>
		<dc:creator>Dominic</dc:creator>
				<category><![CDATA[Email address validation]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[ietf]]></category>
		<category><![CDATA[rfc2821]]></category>
		<category><![CDATA[rfc2822]]></category>
		<category><![CDATA[rfc3696]]></category>
		<category><![CDATA[rfc4291]]></category>
		<category><![CDATA[rfc5322]]></category>
		<category><![CDATA[rfc822]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://blog.dominicsayers.com/?p=515</guid>
		<description><![CDATA[This has allowed me to make it a true validator - it follows the RFCs as precisely as I can make it - without losing real-world usefulness.

is_email() version 2.1 was released yesterday. Try it. Let me know if it works for you.]]></description>
			<content:encoded><![CDATA[<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
<p>I&#8217;ve had a lot of correspondence about <em><a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">is_email()</a></em>, the free PHP email address validation software that I maintain. The principle topics of debate were the edge cases where an email address is technically valid but extremely unlikely in the real world.</p>
<p>Examples of this sort of address would be <em>&#8220;&#8221;@example.com</em> or <em>benedictXIII@va</em> &#8211; the first because it doesn&#8217;t contain any text to identify the mailbox and the second because it&#8217;s at a Top Level Domain.</p>
<p>Both these addresses could exist but neither is likely to. If a user entered one of these addresses into your registration page it is much more likely to be a typo than a real address.</p>
<p>So in the first versions of <em>is_email()</em> I made the decision to call these address invalid because they were unlikely. It was this decision that generated most of the correspondence.</p>
<p>My learned correspondents were right. The purpose of <em>is_email()</em> is to determine whether an address is valid or not. It should not be rejecting valid addresses &#8211; this is the most common fault of other ways of validating email addresses.</p>
<p>But I wanted to identify unlikely addresses without declaring them invalid. For this reason I added a Warning feature to <em>is_email()</em>. Without losing any backward compatibility, I have enabled it to return a diagnostic code that identifies either the fault (if it&#8217;s invalid) or the reason it&#8217;s unlikely to be a real address (despite being valid).</p>
<p>This has allowed me to make it a true validator &#8211; it follows the RFCs as precisely as I can make it &#8211; without losing real-world usefulness.</p>
<p><a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank"><em>is_email()</em> version 2.1</a> was released yesterday. Try it. Let me know if it works for you.</p>
<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
]]></content:encoded>
			<wfw:commentRss>http://blog.dominicsayers.com/2010/08/18/email-validation-version-2-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Comments in email addresses</title>
		<link>http://blog.dominicsayers.com/2009/02/27/comments-in-email-addresses/</link>
		<comments>http://blog.dominicsayers.com/2009/02/27/comments-in-email-addresses/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 10:28:17 +0000</pubDate>
		<dc:creator>Dominic</dc:creator>
				<category><![CDATA[Email address validation]]></category>
		<category><![CDATA[Relevant to my work]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[cal henderson]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[ietf]]></category>
		<category><![CDATA[paul gregg]]></category>
		<category><![CDATA[rfc2821]]></category>
		<category><![CDATA[rfc2822]]></category>
		<category><![CDATA[rfc3696]]></category>
		<category><![CDATA[rfc5322]]></category>
		<category><![CDATA[rfc822]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://blog.dominicsayers.com/?p=408</guid>
		<description><![CDATA[I was turning a blind eye to the part of RFC5322 that allows you to put comments within an email address. But Cal H brought it up in an email so I had to bite the bullet.]]></description>
			<content:encoded><![CDATA[<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
<p>I was turning a blind eye to the part of <a href="http://tools.ietf.org/html/rfc5322" target="_blank">RFC5322</a> that allows you to put comments <em>within</em> an email address. But <a href="http://www.iamcal.com/help/cal/" target="_blank">Cal H</a> brought it up in an email so I had to bite the bullet.</p>
<p>On reflection I think this was worthwhile. The most common error in email address validators is that they reject valid addresses. This really annoys people who like to put a &#8216;+&#8217; in their address and find they can&#8217;t because registration form won&#8217;t allow it.</p>
<p>Why do they like putting a &#8216;+&#8217; in their address? Well it effectively tags the incoming email for you automatically. Mail sent to <em>first.last+hello@example.com</em> will go to the <em>first.last</em> mailbox, tagged with &#8216;hello&#8217;. GMail will do this for you &#8211; try it.</p>
<p>So that&#8217;s why I think it&#8217;s worth allowing comments. The next GMail might be able to do the same thing or something even more useful with comments:</p>
<p><em>first.last(notify IM)@example.com</em></p>
<p>Version 1.6 of my validator now passes all 222 unit tests. So does Cal&#8217;s. I see no reason why you wouldn&#8217;t use one of these in your project: they are free and they work. Why reinvent the wheel?</p>
<h4>RFC nerd notes</h4>
<p>Comments can contain folding white space and can be nested. This is the final nail in the coffin for regular expressions that claim to validate email address. Show me a regex that says this is a valid address:</p>
<p><em>first(Welcome to<br />
 the (&#8220;wonderful&#8221; (!)) world<br />
 of email)@example.com</em></p>
<p>A thank-you also to Paul Gregg who allowed me to add his validator to the head-to-head (and added mine to <a href="http://www.pgregg.com/projects/php/code/showvalidemail.php" target="_blank">his page</a>). He also provided some more unit tests.</p>
<h4><em><span style="font-style:normal;">Quick links: </span><a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank"><span style="font-style:normal;">Source code</span></a><span style="font-style:normal;"> | </span><a href="http://www.dominicsayers.com/isemail/" target="_blank"><span style="font-style:normal;">Email address validators head-to-head</span></a><br />
</em></h4>
]]></content:encoded>
			<wfw:commentRss>http://blog.dominicsayers.com/2009/02/27/comments-in-email-addresses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>light@the.end.of.the.tunnel</title>
		<link>http://blog.dominicsayers.com/2009/02/24/lighttheendofthetunnel/</link>
		<comments>http://blog.dominicsayers.com/2009/02/24/lighttheendofthetunnel/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 12:10:29 +0000</pubDate>
		<dc:creator>Dominic</dc:creator>
				<category><![CDATA[Email address validation]]></category>
		<category><![CDATA[Relevant to my work]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[cal henderson]]></category>
		<category><![CDATA[ietf]]></category>
		<category><![CDATA[rfc2821]]></category>
		<category><![CDATA[rfc2822]]></category>
		<category><![CDATA[rfc5322]]></category>
		<category><![CDATA[rfc822]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://blog.dominicsayers.com/?p=406</guid>
		<description><![CDATA[I've released version 1.3 of my validator and you can download it with the test cases from Google Code.]]></description>
			<content:encoded><![CDATA[<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
<p>The amazingly helpful Cal Henderson has nearly caught up in the arms race that is email address validation. After our latest round of discussions we disagree about only one of the 161 test cases in the test suite. Cal&#8217;s validator successfully validates all the test cases except that one (and he may be right about it -we&#8217;ll see).</p>
<p>I&#8217;ve released version 1.3 of my validator and you can <a href="http://code.google.com/p/isemail/source/browse/trunk" target="_blank">download</a> it with the test cases from Google Code.</p>
<h4>RFC nerd notes</h4>
<p>I had a lesson from Cal on Folding White Space. Who knew that you could have an email address that was split over several lines? Please don&#8217;t run out and try this &#8211; it&#8217;s strictly for completeness.</p>
<p>Secondly, all those validators out there that use <a href="http://tools.ietf.org/html/rfc2822" target="_blank">RFC2822</a> as their authority: those are <em>yesterday&#8217;s</em> validators. All the cool kids are validating using <a href="http://tools.ietf.org/html/rfc5322" target="_blank">RFC5322</a>. It&#8217;s the latest thing.</p>
<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
]]></content:encoded>
			<wfw:commentRss>http://blog.dominicsayers.com/2009/02/24/lighttheendofthetunnel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>confused@rfc5322.com</title>
		<link>http://blog.dominicsayers.com/2009/02/23/confusedrfc2822com/</link>
		<comments>http://blog.dominicsayers.com/2009/02/23/confusedrfc2822com/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 13:17:35 +0000</pubDate>
		<dc:creator>Dominic</dc:creator>
				<category><![CDATA[Email address validation]]></category>
		<category><![CDATA[Relevant to my work]]></category>
		<category><![CDATA[cal henderson]]></category>
		<category><![CDATA[ietf]]></category>
		<category><![CDATA[john klensin]]></category>
		<category><![CDATA[jon postel]]></category>
		<category><![CDATA[rfc2821]]></category>
		<category><![CDATA[rfc2822]]></category>
		<category><![CDATA[rfc3696]]></category>
		<category><![CDATA[rfc5321]]></category>
		<category><![CDATA[rfc822]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://blog.dominicsayers.com/?p=402</guid>
		<description><![CDATA[Do you think this is a valid email address?

""@example.com

No, me neither.]]></description>
			<content:encoded><![CDATA[<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
<p>Do you think this is a valid email address?</p>
<blockquote><p><em>&#8220;&#8221;@example.com</em></p></blockquote>
<p>No, me neither. In one sense it clearly isn&#8217;t since there is no mailbox of that name at example.com&#8217;s mail host. Send <a href="mailto:&quot;&quot;@example.com" target="_blank">mail</a> to that address and you won&#8217;t find anybody reading it.</p>
<p>In another sense, however, it is a perfectly good email address. That is, if you believe the RFCs that define how email addresses should be constructed. Here&#8217;s the <a href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form" target="_blank">BNF</a> from <a href="http://tools.ietf.org/html/rfc5322#section-3.4.1" target="_blank">RFC5322</a> for example:</p>
<pre class="newpage">addr-spec       =       local-part "@" domain</pre>
<pre class="newpage">local-part      =       dot-atom / quoted-string / obs-local-part</pre>
<pre class="newpage">quoted-string   =       [<a href="http://tools.ietf.org/html/rfc2822#ref-CFWS">CFWS</a>]
                        DQUOTE *([<a href="http://tools.ietf.org/html/rfc2822#ref-FWS">FWS</a>] qcontent) [<a href="http://tools.ietf.org/html/rfc2822#ref-FWS">FWS</a>] DQUOTE
                        [<a href="http://tools.ietf.org/html/rfc2822#ref-CFWS">CFWS</a>]</pre>
<p>Don&#8217;t worry if you can&#8217;t follow the BNF syntax &#8211; I couldn&#8217;t either until this week. Focus on the asterisk before <em>([</em><a href="http://tools.ietf.org/html/rfc2822#ref-FWS"><em>FWS</em></a><em>] qcontent)</em>. That asterisk means the contents of that bracket can occur <strong>zero</strong> or more times.</p>
<p>So tracing it through the specification:</p>
<ol>
<li>An email address is a <em>local-part</em> followed by an <em>@</em> sign followed by a <em>domain</em></li>
<li>A <em>local-part</em> can be a <em>quoted-string</em></li>
<li>A <em>quoted-string</em> is a pair of double quotes surrounding <em><strong>zero or more characters</strong></em>.</li>
</ol>
<p>&#8220;&#8221;@example.com follows these rules perfectly. And yet common sense suggests this is a preposterous address. Where should the receiving host deliver it?</p>
<p>I have had some discussions about this with <a href="http://www.iamcal.com/help/cal/" target="_blank">Cal Henderson</a> and we are somewhat at a loss. Both of us have <a href="http://www.dominicsayers.com/isemail/" target="_blank">functions that validate email addresses</a> and we cannot decide whether to follow the RFCs or common sense.</p>
<p>I could suggest the <a href="http://en.wikipedia.org/wiki/IETF" target="_blank">IETF</a> add an <a href="http://www.rfc-editor.org/" target="_blank">erratum</a> to their RFC but this format is also documented in RFC <a href="http://tools.ietf.org/html/rfc5321#section-4.1.2" target="_blank">5321</a> as well. No amount of published errata will correct the impression given by two published RFCs.</p>
<p>Perhaps we are wrong &#8211; can you think of a valid purpose for an email address of this format?</p>
<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
]]></content:encoded>
			<wfw:commentRss>http://blog.dominicsayers.com/2009/02/23/confusedrfc2822com/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Email address validation 1.2</title>
		<link>http://blog.dominicsayers.com/2009/02/22/email-address-validation-12/</link>
		<comments>http://blog.dominicsayers.com/2009/02/22/email-address-validation-12/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 15:25:24 +0000</pubDate>
		<dc:creator>Dominic</dc:creator>
				<category><![CDATA[Email address validation]]></category>
		<category><![CDATA[Relevant to my work]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[cal henderson]]></category>
		<category><![CDATA[dave child]]></category>
		<category><![CDATA[doug lovell]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[haacked]]></category>
		<category><![CDATA[iamcal]]></category>
		<category><![CDATA[ietf]]></category>
		<category><![CDATA[phil haack]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rfc]]></category>
		<category><![CDATA[rfc2821]]></category>
		<category><![CDATA[rfc2822]]></category>
		<category><![CDATA[rfc3696]]></category>
		<category><![CDATA[rfc822]]></category>
		<category><![CDATA[simon slick]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://blog.dominicsayers.com/?p=399</guid>
		<description><![CDATA[I've also updated my own routine so that it still passes all the tests, of which there are now 158. As always, the full analysis is on my website and the latest version of the source code will always be in Google Code.]]></description>
			<content:encoded><![CDATA[<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
<p>I had some very helpful input from Cal Henderson on interpreting RFC 2822. I&#8217;ve included his latest validator in my head-to-head comparison and updated the test suite to reflect the consensus from our discussion.</p>
<p>I&#8217;ve also updated my own routine so that it still passes all the tests, of which there are now 158. As always, the <a href="http://www.dominicsayers.com/isemail/" target="_blank">full analysis</a> is on my website and the <a href="http://code.google.com/p/isemail/source/browse/trunk" target="_blank">latest version of the source code</a> will always be in Google Code.</p>
<p>I would really appreciate it if you find a valid address that fails my validator, or an invalid one that passes, if you would get in touch with me and let me know.</p>
<p>Here are the latest scores:</p>
<p>Dominic Sayers: <strong>100% validated correctly<br />
<span style="font-weight:normal;">Simon Slick: <strong>91</strong><strong>%</strong><br />
Cal Henderson: <strong>84</strong><strong>%<br />
</strong></span></strong>Phil Haack: <strong>80</strong><strong>%<br />
<span style="font-weight:normal;">Dave Child</span><span style="font-weight:normal;">: </span>79</strong><strong>%</strong> </p>
<p><strong><span style="font-weight:normal;">I know Cal is working on IPv6 validation so this may change soon.</span></strong></p>
<h4><strong></strong>RFC nerd notes</h4>
<p>There are two principle changes in this version.</p>
<p>Firstly, I now accept Dave Child and Cal Henderson&#8217;s opinion that a backslash can escape <em>anything</em> in a quoted string local element. However, it must escape something &#8211; it can&#8217;t be at the end of the string.</p>
<p>Secondly, if the string is <em>not</em> quoted then the local element must be a vanilla atom. You can&#8217;t escape individual characters unless the element is surrounded by double quotes.</p>
<p>By &#8220;local element&#8221; I mean a single component of a dot-delimited local part.</p>
<p>I&#8217;ve extracted the raw specification of a valid email address in BNF (<a href="http://en.wiktionary.org/wiki/Backus-Naur_form">Backus-Naur form</a>) from RFC 5322 and put it here: <a href="http://www.dominicsayers.com/isemail/isemail/RFC5322BNF.html">The BNF from RFC 5322 defining parts of a valid email address</a>. If you try to follow this in the RFC you end up going backwards and forwards and getting confused &#8211; it&#8217;s much easier to understand in the way I&#8217;ve laid it out.</p>
<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
]]></content:encoded>
			<wfw:commentRss>http://blog.dominicsayers.com/2009/02/22/email-address-validation-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email address validation 1.0</title>
		<link>http://blog.dominicsayers.com/2009/02/20/email-address-validation-10/</link>
		<comments>http://blog.dominicsayers.com/2009/02/20/email-address-validation-10/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 10:39:14 +0000</pubDate>
		<dc:creator>Dominic</dc:creator>
				<category><![CDATA[Email address validation]]></category>
		<category><![CDATA[Relevant to my work]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[cal henderson]]></category>
		<category><![CDATA[dave child]]></category>
		<category><![CDATA[doug lovell]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[haacked]]></category>
		<category><![CDATA[ietf]]></category>
		<category><![CDATA[phil haack]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rfc]]></category>
		<category><![CDATA[rfc2822]]></category>
		<category><![CDATA[rfc3696]]></category>
		<category><![CDATA[rfc822]]></category>
		<category><![CDATA[simon slick]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://blog.dominicsayers.com/?p=384</guid>
		<description><![CDATA[I have now released version 1.0 of my PHP email address validator. This version passes all 139 unit tests in the suite - tests I have collated from RFC 3696 and from articles by Dave Child, Doug Lovell and Phil Haack. Plus some of my own to test the IPv6 address format.]]></description>
			<content:encoded><![CDATA[<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
<p>OK, after some correspondence with <a href="http://www.addedbytes.com/blog/email-address-validation-v2/" target="_blank">Dave Child</a> and <a href="http://code.iamcal.com/php/rfc822/" target="_blank">Cal Henderson</a> I have now released version 1.0 of my PHP email address validator.</p>
<p>This version passes all 139 unit tests in the suite &#8211; tests I have collated from <a href="http://www.apps.ietf.org/rfc/rfc3696.html" target="_blank">RFC 3696</a> and from articles by Dave Child, <a href="http://www.linuxjournal.com/article/9585" target="_blank">Doug Lovell</a> and <a href="http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx" target="_blank">Phil Haack</a> plus some of my own to test the IPv6 address format. The <a href="http://www.dominicsayers.com/isemail/" target="_blank">full analysis</a> is on my website and the <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">latest version of the source code</a> will always be in Google Code.</p>
<p>I would really appreciate it if you find a valid address that fails my validator, or an invalid one that passes, if you would get in touch with me and let me know.</p>
<p>Here are the scores on the doors:</p>
<p>Dominic Sayers: <strong>100% validated correctly</strong><br />
Simon Slick: <strong>86%</strong><br />
Dave Child: <strong>81%</strong><br />
Phil Haack: <strong>79%</strong><br />
Cal Henderson: <strong>71%</strong></p>
<p>For the RFC nerds, this version now correctly validates the obsolete local form of <em>word *(&#8220;.&#8221; word)</em>. In other words you can regard the local part of the address as a dot-delimited series of elements each of which can be separately quoted. This means that <em>first.&#8221;last&#8221;@example.com</em> is now recognised as a valid address.</p>
<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
]]></content:encoded>
			<wfw:commentRss>http://blog.dominicsayers.com/2009/02/20/email-address-validation-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email validation head-to-head</title>
		<link>http://blog.dominicsayers.com/2009/02/10/email-validation-head-to-head/</link>
		<comments>http://blog.dominicsayers.com/2009/02/10/email-validation-head-to-head/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 12:42:05 +0000</pubDate>
		<dc:creator>Dominic</dc:creator>
				<category><![CDATA[Email address validation]]></category>
		<category><![CDATA[Relevant to my work]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[cal henderson]]></category>
		<category><![CDATA[dave child]]></category>
		<category><![CDATA[doug lovell]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[ietf]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rfc]]></category>
		<category><![CDATA[rfc2822]]></category>
		<category><![CDATA[rfc3696]]></category>
		<category><![CDATA[rfc822]]></category>
		<category><![CDATA[simon slick]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://blog.dominicsayers.com/?p=377</guid>
		<description><![CDATA[I've discovered a number of other public-domain functions that attempt to validate the format of an email address. I tried to validate my 124 test cases against these functions with interesting results]]></description>
			<content:encoded><![CDATA[<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
<p>I&#8217;ve discovered a number of other public-domain functions that attempt to validate the format of an email address. I tried to validate my 124 test cases against these functions with the results below:</p>
<p><a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Dominic Sayers</a>: 100% correctly validated<br />
<a href="http://simonslick.com/VEAF/" target="_blank">Simon Slick</a>: 88% <br />
<a href="http://code.google.com/p/php-email-address-validation" target="_blank">Dave Child</a>: 80%<br />
<a href="http://code.iamcal.com/php/rfc822/" target="_blank">Cal Henderson</a>: 72%</p>
<p>Interestingly, all the other functions failed correctly to validate the example addresses given in <a href="http://www.apps.ietf.org/rfc/rfc3696.html#sec-3" target="_blank">RFC3696</a> (Section 3: Restrictions on email addresses).</p>
<p>I couldn&#8217;t include Doug Lovell&#8217;s <a href="http://www.linuxjournal.com/article/9585" target="_blank">function</a> in my tests because the code is copyright All Rights Reserved by Linux Journal (ironically).</p>
<p>Some of the other functions also supply test cases; I&#8217;ve added these to my test suite. More analysis and commentary here: <a href="http://www.dominicsayers.com/isemail/" target="_blank">RFC-compliant email address validator</a>.</p>
<p>In summary, I recommend you use my function if you want totally RFC-compliant address validation.</p>
<h4>Quick links: <a href="http://code.google.com/p/isemail/source/browse/#svn/trunk" target="_blank">Source code</a> | <a href="http://www.dominicsayers.com/isemail/" target="_blank">Email address validators head-to-head</a></h4>
]]></content:encoded>
			<wfw:commentRss>http://blog.dominicsayers.com/2009/02/10/email-validation-head-to-head/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
