2017-07-16 00:08:33 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = {
|
2017-11-15 21:59:37 +08:00
|
|
|
SCHEMA_VERSION: '1.0',
|
|
|
|
|
|
|
|
// how many modifications to cache before writing
|
2017-07-16 00:08:33 +08:00
|
|
|
BULK_BATCH_SIZE: 150,
|
|
|
|
|
|
|
|
// how often to clear expired messages
|
2017-11-23 17:51:37 +08:00
|
|
|
GC_INTERVAL: 15 * 60 * 1000,
|
2017-07-16 00:08:33 +08:00
|
|
|
|
|
|
|
// artificail delay between deleting next expired message in ms
|
2017-11-15 21:59:37 +08:00
|
|
|
// set to 0 to disable
|
2017-11-17 19:37:53 +08:00
|
|
|
GC_DELAY_DELETE: 0,
|
2017-07-17 21:32:31 +08:00
|
|
|
|
2017-11-17 19:37:53 +08:00
|
|
|
// default
|
2017-07-17 21:32:31 +08:00
|
|
|
MAX_STORAGE: 1 * (1024 * 1024 * 1024),
|
|
|
|
MAX_RECIPIENTS: 2000,
|
|
|
|
MAX_FORWARDS: 2000,
|
|
|
|
|
2017-07-18 16:17:36 +08:00
|
|
|
JUNK_RETENTION: 30 * 24 * 3600 * 1000,
|
|
|
|
|
2017-07-21 02:33:41 +08:00
|
|
|
MAILBOX_COUNTER_TTL: 24 * 3600,
|
|
|
|
|
2017-11-08 22:22:07 +08:00
|
|
|
// how much plaintext to store in a full text indexed field
|
2017-11-15 21:59:37 +08:00
|
|
|
MAX_PLAINTEXT_INDEXED: 1 * 1024,
|
2017-11-08 22:22:07 +08:00
|
|
|
|
|
|
|
// how much plaintext to store before truncating
|
|
|
|
MAX_PLAINTEXT_CONTENT: 100 * 1024,
|
2017-07-21 02:33:41 +08:00
|
|
|
|
2017-11-15 21:59:37 +08:00
|
|
|
// how much HTML content to store before truncating. not indexed
|
2017-07-30 23:07:35 +08:00
|
|
|
MAX_HTML_CONTENT: 300 * 1024,
|
|
|
|
|
2018-01-12 16:16:16 +08:00
|
|
|
MAX_AUTOREPLY_INTERVAL: 4 * 3600 * 1000,
|
2017-07-30 23:07:35 +08:00
|
|
|
|
2017-08-05 20:39:31 +08:00
|
|
|
MAX_AUTOREPLIES: 2000,
|
|
|
|
|
2017-08-07 21:19:38 +08:00
|
|
|
BCRYPT_ROUNDS: 12,
|
|
|
|
|
|
|
|
// how many authentication failures per user to allow before blocking until the end of the auth window
|
2018-04-13 10:22:49 +08:00
|
|
|
USER_AUTH_FAILURES: 12,
|
2017-08-07 21:19:38 +08:00
|
|
|
// authentication window in seconds, starts counting from first invalid authentication
|
2018-04-13 10:22:49 +08:00
|
|
|
USER_AUTH_WINDOW: 120,
|
|
|
|
|
|
|
|
// how many authentication failures per ip to allow before blocking until the end of the auth window
|
|
|
|
IP_AUTH_FAILURES: 10,
|
|
|
|
// authentication window in seconds, starts counting from first invalid authentication
|
|
|
|
IP_AUTH_WINDOW: 300,
|
2017-08-07 21:19:38 +08:00
|
|
|
|
|
|
|
// how many TOTP failures per user to allow before blocking until the end of the auth window
|
|
|
|
TOTP_FAILURES: 6,
|
|
|
|
// TOTP authentication window in seconds, starts counting from first invalid authentication
|
2017-11-06 23:32:45 +08:00
|
|
|
TOTP_WINDOW: 180,
|
|
|
|
|
2017-11-10 21:04:58 +08:00
|
|
|
SCOPES: ['imap', 'pop3', 'smtp'],
|
|
|
|
|
|
|
|
// Refuse to process messages larger than 64 MB. Allowing larger messages might cause jumbo chunks in MongoDB
|
2017-11-17 19:37:53 +08:00
|
|
|
MAX_ALLOWE_MESSAGE_SIZE: 64 * 1024 * 1024,
|
|
|
|
|
|
|
|
// how long to keep deleted messages around before purgeing
|
|
|
|
ARCHIVE_TIME: 2 * 7 * 24 * 3600 * 1000
|
2017-07-16 00:08:33 +08:00
|
|
|
};
|