Skip to content

Commit

Permalink
feat: added IMAP support (~73% code coverage), license update (BUSL-1…
Browse files Browse the repository at this point in the history
….1 and MPL-2.0) 🚀 🎉
  • Loading branch information
titanism committed Oct 14, 2023
1 parent 2e2364b commit 525d28b
Show file tree
Hide file tree
Showing 413 changed files with 37,572 additions and 1,044 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) Forward Email LLC
* SPDX-License-Identifier: BUSL-1.1
*/

module.exports = {
extends: ['@commitlint/config-conventional']
};
17 changes: 17 additions & 0 deletions .copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
schema_version = 1

project {
license = "BUSL-1.1"
copyright_holder = "Forward Email LLC"
header_ignore = [
"app/models/journals.js",
"app/models/mailboxes.js",
"app/models/messages.js",
"app/models/threads.js",
"helpers/imap-notifier.js",
"helpers/imap/**",
"helpers/socket-error.js",
"imap-server.js",
"test/imap/**"
]
}
19 changes: 19 additions & 0 deletions .env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ EMAILS_MONGO_PORT=27017
EMAILS_MONGO_NAME=forwardemail_emails_{{NODE_ENV}}
EMAILS_MONGO_URI="mongodb://{{EMAILS_MONGO_HOST}}:{{EMAILS_MONGO_PORT}}/{{EMAILS_MONGO_NAME}}"

IMAP_MONGO_USER=
IMAP_MONGO_PASS=
IMAP_MONGO_HOST=localhost
IMAP_MONGO_PORT=27017
IMAP_MONGO_NAME=forwardemail_imap_{{NODE_ENV}}
IMAP_MONGO_URI="mongodb://{{IMAP_MONGO_HOST}}:{{IMAP_MONGO_PORT}}/{{IMAP_MONGO_NAME}}"

###########
## redis ##
###########
Expand Down Expand Up @@ -183,6 +190,11 @@ MANDARIN_REDIS_USERNAME={{REDIS_USERNAME}}
MANDARIN_REDIS_PORT={{REDIS_PORT}}
MANDARIN_REDIS_HOST={{REDIS_HOST}}
MANDARIN_REDIS_PASSWORD={{REDIS_PASSWORD}}
IMAP_REDIS_TLS={{REDIS_TLS}}
IMAP_REDIS_USERNAME={{REDIS_USERNAME}}
IMAP_REDIS_PORT={{REDIS_PORT}}
IMAP_REDIS_HOST={{REDIS_HOST}}
IMAP_REDIS_PASSWORD={{REDIS_PASSWORD}}

#############
## certbot ##
Expand Down Expand Up @@ -253,6 +265,7 @@ API_RESTRICTED_SYMBOL=API_RESTRICTED_SYMBOL
##########################
## smtp mirrored config ##
##########################
SMTP_ALLOW_INSECURE_AUTH=false
SMTP_TRANSPORT_USER="{{EMAIL_DEFAULT_FROM_EMAIL}}"
SMTP_TRANSPORT_PASS=""
SMTP_TRANSPORT_HOST={{SMTP_HOST}}
Expand All @@ -265,6 +278,12 @@ SMTP_EXCHANGE_DOMAINS=mx1.forwardemail.net,mx2.forwardemail.net
TRUTH_SOURCES=
MAX_RECIPIENTS=50

##########
## imap ##
##########
IMAP_HOST=localhost
IMAP_PORT=2143

#####################
## email retention ##
#####################
Expand Down
21 changes: 21 additions & 0 deletions .env.schema
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ EMAILS_MONGO_PORT=
EMAILS_MONGO_NAME=
EMAILS_MONGO_URI=

IMAP_MONGO_USER=
IMAP_MONGO_PASS=
IMAP_MONGO_HOST=
IMAP_MONGO_PORT=
IMAP_MONGO_NAME=
IMAP_MONGO_URI=

###########
## redis ##
###########
Expand All @@ -179,6 +186,11 @@ MANDARIN_REDIS_TLS=
MANDARIN_REDIS_PORT=
MANDARIN_REDIS_HOST=
MANDARIN_REDIS_PASSWORD=
IMAP_REDIS_TLS=
IMAP_REDIS_USERNAME=
IMAP_REDIS_PORT=
IMAP_REDIS_HOST=
IMAP_REDIS_PASSWORD=

#############
## certbot ##
Expand Down Expand Up @@ -248,16 +260,25 @@ API_RESTRICTED_SYMBOL=
##########################
## smtp mirrored config ##
##########################
SMTP_ALLOW_INSECURE_AUTH=
SMTP_TRANSPORT_USER=
SMTP_TRANSPORT_PASS=
SMTP_TRANSPORT_HOST=
SMTP_TRANSPORT_PORT=
SMTP_TRANSPORT_SECURE=
SMTP_HOST=
SMTP_PORT=
SMTP_MESSAGE_MAX_SIZE=
SMTP_EXCHANGE_DOMAINS=
TRUTH_SOURCES=
MAX_RECIPIENTS=

##########
## imap ##
##########
IMAP_HOST=
IMAP_PORT=

#####################
## email retention ##
#####################
Expand Down
5 changes: 5 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) Forward Email LLC
* SPDX-License-Identifier: BUSL-1.1
*/

module.exports = {
'*.md,!test/snapshots/**/*.md,!test/**/snapshots/**/*.md,!locales/README.md':
[(filenames) => filenames.map((filename) => `remark ${filename} -qfo`)],
Expand Down
5 changes: 5 additions & 0 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) Forward Email LLC
* SPDX-License-Identifier: BUSL-1.1
*/

module.exports = {
plugins: {
'stylelint': {},
Expand Down
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) Forward Email LLC
* SPDX-License-Identifier: BUSL-1.1
*/

module.exports = {
plugins: [require('@prettier/plugin-pug')],
singleQuote: true,
Expand Down
5 changes: 5 additions & 0 deletions .pug-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) Forward Email LLC
* SPDX-License-Identifier: BUSL-1.1
*/

module.exports = {
extends: '@ladjs/pug-lint-config-lad',

Expand Down
8 changes: 7 additions & 1 deletion .remarkrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
/**
* Copyright (c) Forward Email LLC
* SPDX-License-Identifier: BUSL-1.1
*/

module.exports = {
plugins: [
'preset-github',
[
'remark-license',
{
file: 'https://github.com/forwardemail/forwardemail.net/blob/master/LICENSE'
file: 'https://github.com/forwardemail/forwardemail.net/blob/master/LICENSE.md',
heading: '## License'
}
]
]
Expand Down
5 changes: 5 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) Forward Email LLC
* SPDX-License-Identifier: BUSL-1.1
*/

module.exports = {
"extends": ["stylelint-config-recommended-scss"]
};
5 changes: 5 additions & 0 deletions .xo-config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Copyright (c) Forward Email LLC
* SPDX-License-Identifier: BUSL-1.1
*/

module.exports = {
prettier: true,
space: true,
Expand Down
3 changes: 3 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Forward Email LLC
# SPDX-License-Identifier: BUSL-1.1

---
extends: default

Expand Down
108 changes: 0 additions & 108 deletions LICENSE

This file was deleted.

Loading

1 comment on commit 525d28b

@shaunwarman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kapow!

Please sign in to comment.