Merge branch 'main' into docker

pull/15/head
Clara K 2024-09-17 21:18:43 +02:00 committed by GitHub
commit d4004ef558
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 15 deletions

12
.gitignore vendored
View File

@ -1,6 +1,8 @@
node_modules
.idea
.DS_Store
.vscode
application/config.js
.env
.idea
.vscode
.DS_Store
node_modules
application/config.js

View File

@ -49,7 +49,8 @@ All data is being removed 48hrs after they have reached the mail server.
- `cd 48hr.email`
- `npm i`
- Change all settings to the desired values:
- Either use environmental variables, or modify `application/config.js`
- Either use environmental variables, or modify `application/config.sample.js` (Rename to `config.js` after)
- For a list of values, check `application/config.sample.js`.
- `npm run start`
- #### Service file example:

View File

@ -2,20 +2,22 @@
const config = {
email: {
domains: process.env.DOMAINS,
deleteMailsOlderThanDays: process.env.DELETE_MAILS_OLDER_THAN_DAYS
domains: process.env.EMAIL_DOMAINS,
deleteMailsOlderThanDays: process.env.EMAIL_DELETE_MAILS_OLDER_THAN_DAYS || 2
},
imap: {
user: process.env.IMAP_USER,
password: process.env.IMAP_PASSWORD,
host: process.env.IMAP_SERVER,
port: 993,
tls: true,
authTimeout: 3000,
refreshIntervalSeconds: process.env.IMAP_REFRESH_INTERVAL_SECONDS
port: process.env.IMAP_PORT || 993,
tls: process.env.IMAP_TLS || true,
authTimeout: process.env.IMAP_AUTHTIMEOUT || 3000,
refreshIntervalSeconds: process.env.IMAP_REFRESH_INTERVAL_SECONDS || 10
},
http: {
port: normalizePort(process.env.HTTP_PORT || '3000'),
branding: process.env.HTTP_BRANDING || ["48hr.email", "CrazyCo", "https://crazyco.xyz"]
},
http: {port: normalizePort(process.env.PORT || '3000')},
branding: process.env.BRANDING || ["PROJECT_NAME", "YOUR_NAME", "YOUR_WEBSITE"]
}
if (!config.imap.user || !config.imap.password || !config.imap.host) {
@ -46,4 +48,4 @@ function normalizePort(val) {
return false
}
module.exports = config
module.exports = config;