
Nylas N1 – extensible open-source mail client - ropiku
https://www.nylas.com/N1
======
drdaeman
Beware: from what I understood, this isn't a self-sufficient MUA in
traditional sense, it's a thin client that offloads the interaction with the
actual mail server to a remote system. That said, the credentials to access
the mailbox are entrusted to a third party.

> See the README for full instructions on setting up the sync engine, API, and
> N1 on your local machine.

Sadly, there is no instructions in the linked document yet.

I wonder, can the sync engine and whatever else be bundled with a client, so
it'd be a self-sufficient standalone piece of software?

~~~
grinich
Here's what you need to install to run the entire stack locally:
[https://github.com/nylas/sync-engine](https://github.com/nylas/sync-engine)

Sorry-- launch day craziness :) More docs to follow soon!

~~~
StavrosK
Why do I need to run a whole stack for a mail client? It's a mail client! Why
is everything JS web services :(

~~~
drdaeman
At least half of the blame should be not on them. IMAP doesn't know a thing
about what happened to email in last 10 years (few minor exceptions apply).

They're merely implementing their own means to access email in convenient and
modern way. Say, IMAP has no labels[1] or contacts[2] (and many other things)
- there are proprietary extensions, MS Exchange being the most famous one, but
they're... proprietary. And given that proprietary implementations differ, it
makes sense to create an unifying wrapper.

And JS apps and web services are just an approach that's trendy today.
Personally, I don't like it either, but can't blame for going with the flow.
Especially since it's a business (and going against the flow has costs, both
in development and adoption), not a private project where one can do things in
a way that just feels right, ignoring anything else.

I believe it would absolutely make sense to bundle the "sync engine" within
the mail client, though, to make it standalone. But I understand it's done
this way just because there was only the engine (as a service, not a library)
at the beginning.

____

[1] [https://nylas.com/docs/#labels](https://nylas.com/docs/#labels)

[2] [https://nylas.com/docs/#contacts](https://nylas.com/docs/#contacts)

~~~
saurik
IMAP actually does have labels. They are called flags. Servers tend to not
implement them well at all (sometimes allowing only a handful to exist, and
almost never keeping an index for that metadata, meaning that searches by flag
are either slow or often not even allowed :/), but that is not the fault of
IMAP.

~~~
e12e
Apparently, most sane open source IMAP servers support PERMANENTFLAGS \ *
which as I understand it means user-defined flags?:

[http://serverfault.com/questions/115769/which-imap-flags-
are...](http://serverfault.com/questions/115769/which-imap-flags-are-reliably-
supported-across-most-mail-servers)

I'm not entirely sure what's "happened with email in 10 years"? Search-defined
virtual folders?

~~~
saurik
And, FWIW, search defined virtual folder is a client concept and would be
trivially implemented over IMAP's incredibly powerful (and I believe I
remember being even extensible) search commands, if only IMAP servers tended
to provide the right kinds of index to make such queries fast. (I know this,
as I was working on a highly scalable and very efficient IMAP server a few
years ago that I had to force myself to stop working on as it was too much of
a distraction from the things in life that are actually capable of putting
food on the table.)

Mark Crispin was actually pretty-damned prescient when it came to IMAP: he
believed that client operations should be offloaded to a server that would
have much more disk space and CPU than the client, which is exactly the model
everyone reaches for today, and thereby designed a thin client protocol that
had asynchronous updates baked into its core. A few years ago, he passed away:
here is what I wrote at the time about his mission for IMAP and history on the
project.

[https://news.ycombinator.com/item?id=4826113](https://news.ycombinator.com/item?id=4826113)

Really, the only thing in IMAP to actively dislike is how the thin client view
requires the server to have a "dense" (here I mean the mathematics term, not
from the technical spec) numbering of messages the client is modeling in its
view (this is the reason opening a large mailbox via Zimbra takes forever, and
why many IMAP servers have dumb global locks), but I have come up with some
techniques that should allow me to handle that with minimal overhead.
Otherwise, with some of the modern extensions in place (QRESYNC, for example),
IMAP is pretty damned awesome.

------
ar7hur
I've used the Nylas API for 9 months for my side project iOS email client. It
works very well and the team is super responsive. Documentation is clear and
complete. It makes it super easy to build any email client.

Eventually though, I decided to stop using it because I'm not confortable with
having all my messages stored by "one more" entity in the cloud. Back to good
old IMAP with all the pain it brings.

I'm often wondering if such an API could work in a full end to end encrypted
mode, i.e. messages would be encrypted as they arrive before they are stored
on the server, and only the client would have the key to decrypt them.

~~~
e0m
Engineer from Nylas here: End-to-end encryption is definitely on the roadmap.
In the meantime the Sync Engine service that we're currently hosting for the
sake of convenience is fully open source. You can run everything yourself on
your own machines and still have the modern RESTful API that Nylas exposes. No
more IMAP!!

There's documentation about how to get that setup with N1 here:
[https://github.com/nylas/N1/blob/master/CONTRIBUTING.md](https://github.com/nylas/N1/blob/master/CONTRIBUTING.md)

There's much more on the Sync Engine page here:
[https://github.com/nylas/sync-engine](https://github.com/nylas/sync-engine)

~~~
mwcampbell
> No more IMAP!!

Why is that a big deal? I've worked with IMAP, and it's not that bad.

~~~
mslate
> I've worked with IMAP, and it's not that bad.

I don't believe you.

Every email account provider is different in horrible, horrible ways.

------
grinich
Hi HN-- Michael from Nylas here. We're super excited about this launch, and
happy to answer questions about N1, including plugin architecture, design,
features, etc.

A few Nylanauts will likely hang out in this thread today. Would love to hear
what folks think! :)

~~~
zx2c4
How "natively" does this deal with GMail? My experience with most non-google
mail clients is that the GMail support is almost always broken or ugly in some
way. Does it archive correctly? Label correct? Does it make use of GMail's
IMAP extensions for doing the right things? If not, how does it work? What
level of integration into the GMail workflow is there? I have for a long time
desired a good desktop client for GMail, but all of them rely on an
unacceptably bad mapping between IMAP and GMail idioms that I still have not
found an acceptable one. How does N1 differ?

~~~
grinich
Yep, it does all the right things. All the "heavy lifting" here is done by the
Nylas sync engine which works natively with Gmail labels, actions, search,
etc. and those same semantics are exposed in N1.

We've spent almost 2 years building the sync technology, so it's very stable
and flexible. You can check out the IMAP code here:
[https://github.com/nylas/sync-engine](https://github.com/nylas/sync-engine)

~~~
rspeer
What about the aspects of Gmail that less obviously map onto things a client
should do?

Can it use Gmail's classification of e-mails as "important", "not important",
"updates", or "promotional"?

~~~
pierrec
I don't think GMail exposes the "primary/social/forums/promotional"
classification (which they call categories). However, there's a workaround: in
the GMail web interface, type "category:promotions" (for example) in the top
search bar, and an option will appear to create a filter that automatically
applies a label to all emails matching this condition. (in this case we can
make a "promotions" label.)

Then your label will appear in your desktop client. Kind of a hack but I did
this for thunderbird and it works.

As for making a plugin that handles this automatically - I'm not sure it's
even possible, but I'd love to be proven wrong!

On second thought, the initial setup doesn't really need a plugin so much as
the way categories are _displayed_. Especially cool would be to have them as
tabs like in the web interface: once you get used to them, you find them
sorely missing in desktop clients. I always find it weird to have my personal,
social, and "promotions" emails brutally mixed together.

------
devit
I don't quite understand how the business model of the Nylas platform that
this client depends on works.

Since it provides up to 10 accounts for free, it looks like that end-users
(for whom 10 accounts are more then enough) are not supposed to be the paying
customers, but rather other companies that want to integrate with Gmail, etc.

But... does this mean that these companies are supposed to encourage the user
to connect their e-mail accounts to the company's Nylas platform account, thus
giving Nylas all the user's e-mails and weakening e-mail privacy even more?

Or is the business model something else...?

~~~
wanderfowl
We're not paying for it, so we can only assume that we (or more likely, all of
our emails) are actually the product here.

~~~
zeromantic
Or it could become an e-mail version of the google play store.

------
Jemaclus
Did anyone else get an email from Nylas that they never signed up for? I don't
recall ever signing up for newsletters, so I'm curious as to how I heard about
this in my inbox instead of on HN. Kind of annoying.

~~~
grinich
We used to be called Inbox (www.inboxapp.com) but we changed the name last
year (after Google shipped a product with the same name). You may have signed
up then! Lots and lots of folks from HN certainly did. :)

~~~
mfkp
I got the email this morning and was very confused as well, this makes sense.
Maybe in the next email should write "Nylas (formerly inboxapp.com)",
otherwise I'd imagine your unsubscribe rate is going to be very high.

~~~
Jemaclus
Yep, I already unsubscribed.

------
natrius
Google has all my data, and that allows them to build incredible features for
me, like Google Now and Inbox's automatic parsing of travel and event emails.

I'd rather have all my data myself so I could pick great features from anyone
who makes them. Nylas sounds like a part of the puzzle to make that happen. I
wish you guys the best of luck.

~~~
drdaeman
If you want to have your data yourself, self-hosted mail system is a way to
go.

In terms of privacy, the experience is good. I must warn, though, it's quite
unpleasant in terms of dancing pigs and bunnies[1]. You won't get anything
fancy. The age of protocol development had passed long ago and mail protocols
(IMAP) aren't evolving anymore. Almost all the modern stuff is proprietary to
services and their APIs and clients.

This limitation doesn't apply to mail filtering and automated parsing, though.
Mail filters and processing for self-hosted email is way more powerful one can
normally get with third-party services.

[1]
[https://en.wikipedia.org/wiki/Dancing_pigs](https://en.wikipedia.org/wiki/Dancing_pigs)

~~~
9248
What do you mean by mail filters and processing? Is there anything fun I can
get, may you point a few links for further reading?

It happens that I'm right in the middle of configuring my own server. I've got
only postfix and dovecot for now, nothing fancy yet.

~~~
drdaeman
Dovecot has great support for Sieve, which is a neat and fairly powerful
scripting language for mail filtering:
[http://wiki2.dovecot.org/Pigeonhole/Sieve](http://wiki2.dovecot.org/Pigeonhole/Sieve)

If this is not powerful enough, you can make sieve plugin invoke external
program and pass it MIME-encoded email message for further processing. This
way your server can, for example, add events to your calendar software or do
the accounting based on receipt emails (and I forward my SMS to my IMAP server
too)

Before Sieve I've used tools like procmail
([http://tldp.org/LDP/LG/issue14/procmail.html](http://tldp.org/LDP/LG/issue14/procmail.html)),
although I'm currently only using Dovecot/Sieve setup for my own mail. Some
servers I've configured, for example a DIY SMS gateway at the company I've
worked for, use just postfix+procmail (+ custom bash and Python scripts).

As for the spam filtering, I've had a good experience with rspamd
([https://rspamd.com/](https://rspamd.com/)), which is light on resources,
integrates with Postfix quite nicely, usable out-of-box and is scriptable with
Lua.

Hope those few pointers would help.

~~~
9248
Sorry it took a while to reply.

Thanks a lot for recommending Sieve, I really mean this. There isn't even a
single mention of it on the myriad of the half-baked 'how to setup isp-mail
for personal use' blogspam I keep stumbling into when googling issues.

It looks like a great tool. Now I can probably have 'n' junk mailboxes with
varying personal filters (always wanted this).

------
sam_goody
First, we had SquirrelMail and its ilk.

Then, Roundcube became the standard.

Their dominance is being eroded by Mailpile, RainLoop, and Nylas.

Around the edges, we have Peps[1], Mailr[2] & Kite[3] which may all someday
take off.

Zimbra and the well known groupware vendors (OnlyOffice, Horde, Citadel,
Kolab) are competing in more-or-less the same space.

Probably dozens of other projects that are on the same level that I have never
even heard of. I would love some sort of comparison, even a biased one written
by the respective teams. Anyone have useful links?

[1] [https://github.com/MLstate/PEPS](https://github.com/MLstate/PEPS) [2]
[http://pusto.org/en/mailr/](http://pusto.org/en/mailr/) [3]
[http://khamidou.github.io/kite/](http://khamidou.github.io/kite/)

~~~
grinich
Karim, who built Kite a few years ago, is actually now an engineer at Nylas :)

[https://nylas.com/about](https://nylas.com/about)

------
ori_b
Is it too much to request a modern mail client that supports threads in the
UI?

I find it hard to follow conversations without some form of visual indicator
of who replied to what within a thread.

~~~
grinich
Yeah, it's a tough design decision (assuming you mean nested threads HN-
style).

We may add something like that soon. I agree that it's superior in some
situations. But most folks are familiar with Gmail, so we opted for linear
threading for the first release.

Would love to see a plugin (or several) that explore new thread UIs! Here are
a few you can look at to get started:
[https://nylas.com/n1/examples](https://nylas.com/n1/examples)

------
charlesdenault
I'm super excited about this. I'd love to see a serious collection of
apps/extensions for the platform. I love the ecosystem around gmail, but I
despise using their web-ui. I'd love to have the flexibility baked into a
modern app. I've tried every email app and none of them cut it. They start off
promising, but quickly degrade into feature-bloat (Airmail) or development is
discontinued (Sparrow, Mailbox?).

------
polpo
Is JMAP [1] support on the roadmap? Once email providers (namely Fastmail, who
wrote the spec) start supporting it, of course.

[1] [http://jmap.io/](http://jmap.io/)

~~~
spang
We'll consider JMAP support if it reaches widespread adoption. For now, it
wouldn't add much value, and we have a lot to build!

------
numbsafari
Plugins via JS ... another sad day for GNU Guile. ;-)

------
zx2c4
Source: [https://github.com/nylas/n1](https://github.com/nylas/n1)

------
kstenerud
Damn. Was hoping I could just build it myself, but the bootstrap script is
broken.

\---> Cleaning apm via `apm clean`

dyld: lazy symbol binding failed: Symbol not found: _node_module_register
Referenced from: /Users/karl/tmp/N1/apm/node_modules/atom-package-
manager/node_modules/keytar/build/Release/keytar.node Expected in: dynamic
lookup

dyld: Symbol not found: _node_module_register Referenced from:
/Users/karl/tmp/N1/apm/node_modules/atom-package-
manager/node_modules/keytar/build/Release/keytar.node Expected in: dynamic
lookup

/Users/karl/tmp/N1/apm/node_modules/atom-package-manager/bin/apm: line 28:
27072 Trace/BPT trap: 5 "$binDir/$nodeBin" \--harmony_collections
"$binDir/../lib/cli.js" "$@"

~~~
bengotow
Hey kstenerud,

Thanks for checking out N1! I work on the client. Unfortunately `keytar` is a
bit of a nasty module. Try using `nvm` to run script/bootstrap with Node 10.x.
I think this might be the issue you're seeing:
[https://github.com/atom/apm/issues/195](https://github.com/atom/apm/issues/195).

If you run into anything else, feel free to ping us on the Nylas Community
slack channel ([http://slack-invite.nylas.com/](http://slack-
invite.nylas.com/))

------
kawera
Terrific job, congrats to all the team! Curious to know why you choose MySQL
and not PostgreSQL.

~~~
grinich
Honestly, the main reason is that I previously worked at Dropbox and knew we
could reliably throw ~petabytes at MySQL. Or at the very least, when we
started scaling I could call my friends from Dropbox and Facebook to help out.
:)

Most of our complexity is in the sync later, so we spend more time tuning our
Python sync server. For example, we wrote a custom statistical profiler:
[https://nylas.com/blog/performance](https://nylas.com/blog/performance)

~~~
masida
How hard would it be to create a backend for PostgreSQL?

I'm currently in doubt to move to either Mailpile or your platform on my
personal server. However, PostgreSQL would be a big plus for your platform,
since I don't have any experience with MySQL in recent years, and I rather do
not run it on my VPS just for mail.

~~~
spang
We saw some folks start working on PostgreSQL support here:
[https://github.com/nylas/sync-engine/pull/132](https://github.com/nylas/sync-
engine/pull/132)

It's not something we're likely to support officially in the near future since
we don't run PostgreSQL and don't have the ability to test it well with
production loads, but it'd be neat to see a working community fork.

------
arsalanb
Finally! Always wanted something like this! It looks beautiful! Sorry if this
sounds to flimsy but how an app looks is probably a huge factor for me to
consider using it. This always pushes me away from open source because they
aren't designed (visually) as properly as their proprietory counterparts. Love
this project!

~~~
grinich
Totally agree-- thanks for checking it out! :)

------
mundanevoice
Mutt FTW :D

~~~
spang
I used mutt until I started this company, so I couldn't agree more. :) Reading
HTML emails piped to w3m gets kind of old after a while though!

~~~
fredoliveira
It gets about as old as mutt, one might even say ;)

------
grinich
Hey folks-- sorry about the invite system. I know we sent out download links,
but it turns out way more folks have signed up than we originally planned.

Relatedly, if any experienced devops/sre folks are looking for a new job,
please ping me. ;) mg@nylas.com

------
jbb555
I thought this looked nice until I saw that it's not an email client at all,
it's an interface to a backend service. Sure, you can get the backend and run
it yourself but who wants to do that. Pity, it looked nice.

------
ultim8k
Now this is big bold news! Kudos guys! I'm extremely excited!

------
cjbprime
Congrats, this is great! What's the Nylas story for mobile?

~~~
grinich
stay tuned ;)

------
nicksergeant
I love this and want to try it, but I find it strange that they emailed me to
tell me about it being available, when I can't actually use it without an
invite code.

~~~
grinich
It was available when we sent out the newsletter. Turns out we got a bigger
response than we were expecting!

Hopefully invites will go out over the next few days. Thanks for your
patience.

------
pbreit
The only feature I really care about these days is automatically grouping
"important" and "non-important" emails (and notifying on important).

~~~
grinich
We expose Gmail's Important and non-Important via labels in the UI. And you
can write your own plugin to sort mail based on any heuristics you want!

------
brianjking
Interested...hesitant though with the idea of giving up more access to my
private files. Signed up, looks like I hit a waitlist.

------
j0hnM1st
Tried the documentation for setting up the sync-engine, I must say its bit
confusing. Can we install on say, on a AWS VM ?

~~~
spang
You can, but remember the sync engine doesn't provide any authentication layer
by default, since people use it in so many different ways. You'll want to run
it proxied behind some sort of authentication service. (With AWS, you can do
this with different subnets via VPC.)

------
humility
Congratulations and thanks, had been looking for one for eons now. Looks
promising!

------
ashemark
Hi, do you plan on putting together a pkgbuild for arch linux based systems?

~~~
spang
I don't expect that we'll have time to put this together officially very soon.
If you'd like to help though, the best way would be to figure out how to get
N1 building on arch from the open source repo!

~~~
tylermenezes
Here's a PKGBUILD that works for me:
[https://gist.github.com/tylermenezes/c1934bf72e4db8816690](https://gist.github.com/tylermenezes/c1934bf72e4db8816690)

I can't fully test it yet since I don't have an invite. It starts up, though.

------
anonbanker
This looks like a fantastic roundcube or rainloop competitor. Thank you!

------
tapoxi
Any hope for an RPM or Yum repo for us Fedora users?

~~~
spang
Yep, the only reason we didn't have one for launch is a lack of time. :) You
want to help? First step is making sure `script/grunt mkrpm` works from
[https://github.com/nylas/N1](https://github.com/nylas/N1)!

------
mdeebz22
this is INCREDIBLY cool - have been waiting for this for a long time. Way to
go team! nicely done!

------
stuaxo
Kind of reminds me of Geary.

------
4tacos
I'd pay for this....

------
grandalf
I've been using Mailbox by Dropbox for a while and it's still very rough, not
even beta quality by Google standards.

Most frustrating is that search doesn't work at all.

I have multiple accounts, but if I didn't I would still prefer the gmail web
interface to any thick client app I've used (so far).

