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

Andrew Sutherland asutherland at asutherland.org
Wed Jul 24 04:19:52 UTC 2013


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!)

This work landed as part of 
https://bugzilla.mozilla.org/show_bug.cgi?id=813411 and more discussion 
can be found on the dev-gaia list specifically in 
https://groups.google.com/d/msg/mozilla.dev.gaia/6kIZKj8UIFg/PbTsE_Wu4ZUJ

The tip of the fake-server as we use them can be seen here:
https://github.com/mozilla-b2g/gaia-email-libs-and-more/tree/master/test-runner/chrome/fakeserver

The vendor branch setup I'm using to track against Thunderbird upstream 
can be seen here (note that the branch is "thunderbird-fakeserver-vendor"):
https://github.com/mozilla-b2g/gaia-email-libs-and-more/tree/thunderbird-fakeserver-vendor/test-runner/chrome/fakeserver

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


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? :)

Andrew



More information about the tb-planning mailing list