The gaia e-mail backend is now using Thunderbird's IMAP and SMTP fake-servers. Props to jcranmer!

Joshua Cranmer 🐧 Pidgeot18 at
Thu Jul 25 01:05:08 UTC 2013

On 7/23/2013 11:19 PM, Andrew Sutherland wrote:
> The Firefox OS Gaia E-mail app's back-end has just landed support to 
> re-use Thunderbird's IMAP and SMTP fake-servers for its tests. This is 
> a huge help to us and I very much want to call out jcranmer's 
> initiative and excellent work in creating the fake-servers and JS MIME 
> parser which helps power them.  (The JS MIME parser is even used by 
> our ActiveSync fake-server!)
\o/ I'm also hoping to make the JS MIME stuff even better, but... time 
is what I lack. And speedy reviewers. :-)
> This work landed as part of 
> and more 
> discussion can be found on the dev-gaia list specifically in 
> The tip of the fake-server as we use them can be seen here:
> The vendor branch setup I'm using to track against Thunderbird 
> upstream can be seen here (note that the branch is 
> "thunderbird-fakeserver-vendor"):
> Unfortunately, I'm not sure that there's an easy-way to compare just 
> that sub-tree of the branches to avoid seeing all of the many other 
> implementation changes that have occurred.  I think the easiest way is 
> to just clone the gaia-email-libs-and-more repo and then run 
> file-specific diffs like the following so as to avoid seeing the added 
> files, etc:
> git diff thunderbird-fakeserver-vendor 
> test-runner/chrome/fakeserver/subscript/imapd.js
> git diff thunderbird-fakeserver-vendor 
> test-runner/chrome/fakeserver/subscript/smtpd.js

Do you envision adding features to fakeserver? I'm guessing that many of 
them would be desired by the mailnews testing code as well. If so, then 
it is probably worth discussing an easy to share the fakeserver modules 
(and maybe eventually other code too) between Gaia and Thunderbird.

> The current execution environment for the code is a xulrunner 
> instance, but given current direction a very likely course of action 
> is to try and get the fake-servers running under node.js and trying to 
> spin them off into a separate project/repo so that their use is not 
> restricted to just people hacking on the Thunderbird back-end or the 
> Gaia e-mail app back-end.  (I guess we might pursue re-licensing them 
> under Apache 2 if possible at that point too?  Joshua, how do you feel 
> about re-licensing? :)

As I'm not the sole author of the code, so I don't know to what extent 
it is legal to relicense with just my permission. The other people who 
share significant contributions to this code (according to) are David 
Lechner, Ben Bucksh, Mark Banner, Atul Jangra, David Bienvenu, and Phil 
Lacy. I don't have any problems relicensing myself, but you might to 
check with them as well.

Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist

More information about the tb-planning mailing list