2016-12-02 07:37:44 +08:00
|
|
|
/* eslint global-require: 0 */
|
2016-06-23 05:41:32 +08:00
|
|
|
module.exports = {
|
2016-06-28 01:28:43 +08:00
|
|
|
Provider: {
|
|
|
|
Gmail: 'gmail',
|
|
|
|
IMAP: 'imap',
|
|
|
|
},
|
2016-11-23 08:54:20 +08:00
|
|
|
Imap: require('imap'),
|
2016-12-16 04:04:43 +08:00
|
|
|
Errors: require('./src/errors'),
|
2016-11-24 01:34:38 +08:00
|
|
|
IMAPErrors: require('./src/imap-errors'),
|
2017-03-11 04:21:04 +08:00
|
|
|
SMTPErrors: require('./src/smtp-errors'),
|
2016-12-06 09:59:47 +08:00
|
|
|
loadModels: require('./src/load-models'),
|
|
|
|
AuthHelpers: require('./src/auth-helpers'),
|
2016-11-24 01:34:38 +08:00
|
|
|
PromiseUtils: require('./src/promise-utils'),
|
2016-11-27 04:48:17 +08:00
|
|
|
DatabaseTypes: require('./src/database-types'),
|
2017-03-11 04:21:04 +08:00
|
|
|
IMAPConnection: require('./src/imap-connection').default,
|
2017-03-03 06:45:34 +08:00
|
|
|
IMAPConnectionPool: require('./src/imap-connection-pool'),
|
2016-12-16 04:04:43 +08:00
|
|
|
SendmailClient: require('./src/sendmail-client'),
|
2016-12-02 10:41:40 +08:00
|
|
|
DeltaStreamBuilder: require('./src/delta-stream-builder'),
|
|
|
|
HookTransactionLog: require('./src/hook-transaction-log'),
|
|
|
|
HookIncrementVersionOnSave: require('./src/hook-increment-version-on-save'),
|
2017-02-18 02:55:23 +08:00
|
|
|
BackoffScheduler: require('./src/backoff-schedulers').BackoffScheduler,
|
|
|
|
ExponentialBackoffScheduler: require('./src/backoff-schedulers').ExponentialBackoffScheduler,
|
2017-03-15 01:35:31 +08:00
|
|
|
CommonProviderSettings: require('imap-provider-settings').CommonProviderSettings,
|
2017-02-18 04:41:27 +08:00
|
|
|
MetricsReporter: require('./src/metrics-reporter').default,
|
Revert "Revert "[feat] Add support for send later""
Arc land messed up and landed a not fully merged branch. (Seriously – I
had merged a copy of my branch with master to see how easy it would be.
Because I didn't want to merge the whole thing, I blindly committed my
changes and switched back to my real branch). To my great surprise, arc
decided to use the wrong branch when landing it.
Original commit message:
Summary:
Finally, here it is! Send later, with support for open tracking but
without support for attachments yet. It took me some time to find the
right way to do things.
**The send later dilemna**
There's two ways we could handle send later:
1. do everything on the client
2. process the message in the cloud
1. is very tempting because it would make the cloud server very
simple. Unfortunately, it has some serious limitations, for example,
setting the "Date" message header. That's why I chose to go with 2. When
a user presses the "Send Later" button, we save the open/link tracking
metadata and fills in all the required fields. I added a custom endpoint
to the K2 API to do this, `/drafts/build`. After that, we save the JSON
contents of the message as metadata.
When we process metadata, we simply create a MIME message from the
JSON and send it.
**Limitations**
Right now, send later doesn't support and attachments. There's also
some minor code duplication which needs to be refactored away.
Test Plan: Tested manually. Checked that regular send still worked, too.
Reviewers: mark, spang, halla, juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D4054
2017-03-08 08:27:08 +08:00
|
|
|
MessageFactory: require('./src/message-factory'),
|
|
|
|
SendUtils: require('./src/send-utils'),
|
2017-03-01 07:46:54 +08:00
|
|
|
executeJasmine: require('./spec/jasmine/execute').default,
|
2017-03-31 00:32:52 +08:00
|
|
|
StringUtils: require('./src/string-utils'),
|
[*] Revamp SSL options (including user-facing)
Summary:
Previously, the generic IMAP auth screen presented one security option to
users: "Require SSL". This was ambiguous and difficult to translate into
the correct security options behind the scenes, causing confusion and problems
connecting some accounts.
This patch does the following:
* Separates security settings for IMAP and SMTP, as these different protocols
may also require different SSL/TLS settings
* Reworks the generic IMAP auth page to allow specifying security settings
with higher fidelity. We looked at various different email apps and decided
that the best solution to this problem was to allow more detailed
specification of security settings and to ease the burden of more options
by having sane defaults that work correctly in the majority of cases.
This new screen allows users to pick from "SSL / TLS", "STARTTLS", or "none"
for the security settings for a protocol, and also to instruct us that
they're OK with us using known insecure SSL settings to connect to their
server by checking a checkbox.
We default to port 993 / SSL/TLS for IMAP and port 587 / STARTTLS for SMTP.
These are the most common settings for providers these days and will work
for most folks.
* Significantly tightens our default security. Now that we can allow folks to
opt-in to bad security, by default we should protect folks as best we can.
* Removes some now-unnecessary jank like specifying the SSLv3 "cipher"
in some custom SMTP configs. I don't think this was actually necessary
as SSLv3 is a protocol and not a valid cipher, but these custom
configs may have been necessary because of how the ssl_required flag was
linked between IMAP and SMTP before (and thus to specify different
settings for SMTP you'd have to override the SMTP config).
* Removes hard-coding of Gmail & Office365 settings in several
locations. (This was a major headache while working on the patch.)
This depends on version 2.0.1 of imap-provider-settings, which has major
breaking changes from version 1.0. See commit for more info:
https://github.com/nylas/imap-provider-settings/commit/9851054f9153476b6896d04893a40b4febc8986e
Among other things, I did a serious audit of the settings in this file and
"upgraded" a few servers which weren't using the SSL-enabled ports for their
provider to the secure ones. Hurray for nmap and openssl.
Test Plan: manual
Reviewers: evan, mark, juan, halla
Reviewed By: juan, halla
Differential Revision: https://phab.nylas.com/D4316
2017-04-06 08:34:13 +08:00
|
|
|
TLSUtils: require('./src/tls-utils'),
|
2016-06-23 05:41:32 +08:00
|
|
|
}
|