<story><title>Outlook 2016’s New POP3 Bug Deletes Your Emails</title><url>http://wp.josh.com/2016/02/24/outlook-2016s-new-pop3-bug-deletes-your-emails/</url></story><parent_chain></parent_chain><comment><author>dmbaggett</author><text>From a client standpoint, POP is not actually trivial.&lt;p&gt;The main problem with POP is that unless you do something clever, determining the changes in the mailbox from time &lt;i&gt;t0&lt;/i&gt; to time &lt;i&gt;t1&lt;/i&gt; is both conceptually difficult and computationally expensive. This is because generic POP has no concept of a message UID, so there&amp;#x27;s no principled way to diff between states. In a very real sense, this means that POP is somewhat broken for the most important use case for the client: syncing to server changes.&lt;p&gt;The UIDL extension adds a &amp;quot;UID&amp;quot; but it&amp;#x27;s just an MD5 hash of the contents -- meaning that multiple copies of a message appear to be the same message. And you can ask for just the headers -- which means you can get the message-id header -- but this is still very expensive to do repeatedly (say, every 5 minutes) on a 100,000 message POP store. And you can&amp;#x27;t ask for &lt;i&gt;just&lt;/i&gt; the Message-Id header, which would fix the problem.&lt;p&gt;Even if you have valid UIDs -- which you won&amp;#x27;t -- you still have to run a diff algorithm. Typical dynamic programming algorithms are O(N^2), which obviously sucks big time for a 100,000 message POP store.&lt;p&gt;For Inky (&lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;inky.com&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;inky.com&lt;/a&gt;) we use a clever linear-time diff algorithm based in part on [Meyers 86]: &lt;i&gt;An O(ND) Difference Algorithm and Its Variations.&lt;/i&gt; [Burns &amp;amp; Long 97] &lt;i&gt;A Linear Time, Constant Space Differencing Algorithm&lt;/i&gt; is also a good treatment. But I know Outlook and Thunderbird both use non-linear-time algorithms to diff, so &amp;quot;leave messages on server&amp;quot; gets increasingly (non-linearly) expensive as the mailbox size grows on the server.&lt;p&gt;A few other points on comments made in this thread:&lt;p&gt;- POP is still widely used. In the US, for example, Comcast has finally migrated to IMAP, but Verizon is still POP only.&lt;p&gt;- POP is, from the server standpoint, a very simple protocol, and it is highly amenable to automated testing, as others here have pointed out. For our own testing we generate both patterned and random mailbox modification sequences, then have the test client cooperate with the test server to ensure that the client has (independently) correctly determined what&amp;#x27;s happened to the (test) mailbox. This is a perfect example of a situation where investing significant effort into automated testing pays off -- and where a TDD approach to development would also work well.</text></comment>
<story><title>Outlook 2016’s New POP3 Bug Deletes Your Emails</title><url>http://wp.josh.com/2016/02/24/outlook-2016s-new-pop3-bug-deletes-your-emails/</url></story><parent_chain></parent_chain><comment><author>username223</author><text>&amp;gt; UPDATE 02&amp;#x2F;26&amp;#x2F;2016: ... TL;DR: Disable automatic updates...&lt;p&gt;That&amp;#x27;s just good advice for dealing with modern software, for which fixes, breakage, and feature churn are all mixed in a single awful stream.  &amp;quot;Newer&amp;quot; does not mean &amp;quot;better.&amp;quot;</text></comment>