2016-06-23 14:45:39 +00:00
|
|
|
# This file is the default config file for Mailtrain. To use a environment specific
|
|
|
|
# configuration add new file {ENV}.{ext} (eg. "production.toml") to the same folder.
|
|
|
|
# {ENV} is defined by NODE_ENV environment variable.
|
|
|
|
#
|
|
|
|
# Do not modify this file directly, otherwise you might lose your modifications when upgrading
|
|
|
|
#
|
|
|
|
# You should only define the options you want to change in your additional config file.
|
|
|
|
# For example if the only thing you want to change is the port number for the www server
|
|
|
|
# then your additional config file should look like this:
|
|
|
|
# # production.toml
|
|
|
|
# [www]
|
|
|
|
# port=80
|
|
|
|
# or if you want to use Javascript instead of TOML then the same file could look like this:
|
|
|
|
# // production.js
|
|
|
|
# module.exports = {
|
|
|
|
# www: {
|
|
|
|
# port: 80
|
|
|
|
# }
|
|
|
|
# };
|
|
|
|
|
|
|
|
# Process title visible in monitoring logs and process listing
|
|
|
|
title="mailtrain"
|
2016-04-04 12:36:30 +00:00
|
|
|
|
2017-03-02 17:52:40 +00:00
|
|
|
# Enabled HTML editors
|
|
|
|
editors=[
|
|
|
|
["summernote", "Summernote"],
|
2017-03-10 09:00:42 +00:00
|
|
|
["grapejs", "GrapeJS"],
|
|
|
|
["mosaico", "Mosaico"],
|
2017-03-02 17:52:40 +00:00
|
|
|
["codeeditor", "Code Editor"]
|
|
|
|
]
|
|
|
|
|
2017-03-04 16:15:16 +00:00
|
|
|
# Default language to use
|
|
|
|
language="en"
|
|
|
|
|
2017-03-10 10:27:56 +00:00
|
|
|
# Inject custom styles in layout.hbs
|
|
|
|
# customstyles=["/custom/hello-world.css"]
|
|
|
|
|
|
|
|
# Inject custom scripts in layout.hbs
|
|
|
|
# customscripts=["/custom/hello-world.js"]
|
|
|
|
|
2017-03-19 15:14:31 +00:00
|
|
|
# Inject custom scripts in subscription/layout.mjml.hbs
|
|
|
|
# customsubscriptionscripts=["/custom/hello-world.js"]
|
|
|
|
|
2016-04-16 04:40:59 +00:00
|
|
|
# If you start out as a root user (eg. if you want to use ports lower than 1000)
|
|
|
|
# then you can downgrade the user once all services are up and running
|
|
|
|
#user="nobody"
|
|
|
|
#group="nogroup"
|
|
|
|
|
2016-04-04 12:36:30 +00:00
|
|
|
[log]
|
2016-06-23 14:45:39 +00:00
|
|
|
# silly|verbose|info|http|warn|error|silent
|
2016-05-26 09:53:12 +00:00
|
|
|
level="verbose"
|
2016-04-04 12:36:30 +00:00
|
|
|
|
|
|
|
[www]
|
|
|
|
# HTTP port to listen on
|
|
|
|
port=3000
|
2016-04-11 03:26:20 +00:00
|
|
|
# HTTP interface to listen on
|
|
|
|
host="0.0.0.0"
|
2016-04-04 12:36:30 +00:00
|
|
|
# Secret for signing the session ID cookie
|
|
|
|
secret="a cat"
|
|
|
|
# Session length in seconds when "remember me" is checked
|
|
|
|
remember=2592000 # 30 days
|
2016-06-23 14:45:39 +00:00
|
|
|
# logger interface for expressjs morgan
|
2016-04-04 12:36:30 +00:00
|
|
|
log="dev"
|
2016-06-23 14:45:39 +00:00
|
|
|
# Is the server behind a proxy? true/false
|
|
|
|
# Set this to true if you are serving Mailtrain as a virtual domain through Nginx or Apache
|
|
|
|
proxy=false
|
2016-04-13 05:36:55 +00:00
|
|
|
# maximum POST body size
|
|
|
|
postsize="2MB"
|
2016-06-03 10:15:33 +00:00
|
|
|
# Uncomment to set uploads folder location for temporary data. Defaults to os.tmpdir()
|
2016-06-23 14:45:39 +00:00
|
|
|
# If the service is started by `npm start` then os.tmpdir() points to CWD
|
|
|
|
#tmpdir="/tmp"
|
2016-04-04 12:36:30 +00:00
|
|
|
|
|
|
|
[mysql]
|
|
|
|
host="localhost"
|
|
|
|
user="mailtrain"
|
|
|
|
password="mailtrain"
|
2017-04-25 22:49:31 +00:00
|
|
|
# If more security is desired when running reports (which use user-defined JS scripts located in DB),
|
|
|
|
# one can specify a DB user with read-only permissions. If these are not specified, Mailtrain uses the
|
|
|
|
# regular DB user (which has also write permissions).
|
|
|
|
# userRO="mailtrain-ro"
|
|
|
|
# passwordRO="mailtrain-ro"
|
2016-04-04 12:36:30 +00:00
|
|
|
database="mailtrain"
|
2016-06-23 14:45:39 +00:00
|
|
|
# Some installations, eg. MAMP can use a different port (8889)
|
|
|
|
# MAMP users should also turn on "Allow network access to MySQL" otherwise MySQL might not be accessible
|
|
|
|
port=3306
|
2016-04-04 12:36:30 +00:00
|
|
|
charset="utf8mb4"
|
2016-05-03 09:36:06 +00:00
|
|
|
timezone="local"
|
2016-04-04 12:36:30 +00:00
|
|
|
|
|
|
|
[redis]
|
|
|
|
# enable to use Redis session cache or disable if Redis is not installed
|
|
|
|
enabled=false
|
|
|
|
host="localhost"
|
|
|
|
port=6379
|
|
|
|
db=5
|
2016-06-23 14:45:39 +00:00
|
|
|
# Uncomment if your Redis installation requires a password
|
|
|
|
#password=""
|
2016-04-04 12:36:30 +00:00
|
|
|
|
2016-04-11 03:26:20 +00:00
|
|
|
[verp]
|
2016-06-23 14:45:39 +00:00
|
|
|
# Enable to start an MX server that detects bounced messages using VERP
|
|
|
|
# In most cases you do not want to use it
|
|
|
|
# Requires root privileges
|
2016-04-11 03:26:20 +00:00
|
|
|
enabled=false
|
2017-02-17 13:56:55 +00:00
|
|
|
port=2525
|
2016-04-11 03:26:20 +00:00
|
|
|
host="0.0.0.0"
|
|
|
|
|
2016-04-04 12:36:30 +00:00
|
|
|
[testserver]
|
2016-06-23 14:45:39 +00:00
|
|
|
# Starts a vanity server that redirects all mail to /dev/null
|
|
|
|
# Mostly needed for local development
|
2016-04-04 12:36:30 +00:00
|
|
|
enabled=false
|
|
|
|
port=5587
|
2016-04-11 03:26:20 +00:00
|
|
|
host="0.0.0.0"
|
2016-05-25 15:01:39 +00:00
|
|
|
username="testuser"
|
|
|
|
password="testpass"
|
|
|
|
logger=false
|
2016-08-11 11:21:21 +00:00
|
|
|
|
|
|
|
[ldap]
|
|
|
|
# enable to use ldap user backend
|
|
|
|
enabled=false
|
|
|
|
host="localhost"
|
|
|
|
port=3002
|
|
|
|
baseDN="ou=users,dc=company"
|
|
|
|
filter="(|(username={{username}})(mail={{username}}))"
|
2017-03-15 17:10:00 +00:00
|
|
|
#Username field in LDAP (uid/cn/username)
|
|
|
|
uidTag="username"
|
2016-08-11 12:41:30 +00:00
|
|
|
passwordresetlink=""
|
2016-09-22 09:04:30 +00:00
|
|
|
|
|
|
|
[postfixbounce]
|
|
|
|
# Enable to allow writing Postfix bounce log to Mailtrain listener
|
|
|
|
# If enabled, tail mail.log to Mailtrain with the following command:
|
|
|
|
# tail -f -n +0 /var/log/mail.log | nc localhost 5699 -
|
|
|
|
enabled=false
|
|
|
|
port=5699
|
|
|
|
# allow connections from localhost only
|
|
|
|
host="127.0.0.1"
|
2016-12-07 19:39:36 +00:00
|
|
|
|
|
|
|
# extra options for nodemailer
|
|
|
|
[nodemailer]
|
|
|
|
#textEncoding="base64"
|
2016-12-10 13:27:52 +00:00
|
|
|
|
|
|
|
[queue]
|
|
|
|
# How many parallel sender processes to spawn
|
2016-12-10 22:38:54 +00:00
|
|
|
# You can use more than 1 process only if you have Redis enabled
|
2016-12-10 13:27:52 +00:00
|
|
|
processes=1
|
2017-03-10 09:00:42 +00:00
|
|
|
|
2017-04-03 17:53:01 +00:00
|
|
|
[cors]
|
|
|
|
# Allow subscription widgets to be embedded
|
|
|
|
# origins=['https://www.example.com']
|
|
|
|
|
2017-03-10 09:00:42 +00:00
|
|
|
[mosaico]
|
|
|
|
# Installed templates
|
|
|
|
templates=[["versafix-1", "Versafix One"]]
|
2017-03-10 14:44:23 +00:00
|
|
|
# Inject custom scripts
|
|
|
|
# customscripts=["/mosaico/custom/my-mosaico-plugin.js"]
|
2017-03-10 09:00:42 +00:00
|
|
|
|
|
|
|
[grapejs]
|
|
|
|
# Installed templates
|
|
|
|
templates=[["demo", "Demo Template"]]
|
2017-04-25 22:49:31 +00:00
|
|
|
|
|
|
|
[reports]
|
|
|
|
# The whole reporting functionality can be disabled below if the they are not needed and the DB cannot be
|
|
|
|
# properly protected.
|
|
|
|
# Reports rely on custom user defined Javascript snippets defined in the report template. The snippets are run on the
|
|
|
|
# server when generating a report. As these snippets are stored in the DB, they pose a security risk because they can
|
|
|
|
# help gaining access to the server if the DB cannot
|
|
|
|
# be properly protected (e.g. if it is shared with another application with security weaknesses).
|
|
|
|
# Mailtrain mitigates this problem by running the custom Javascript snippets in a chrooted environment and under a
|
|
|
|
# DB user that cannot modify the database (see userRO in [mysql] above). However the chrooted environment is available
|
|
|
|
# only if Mailtrain is started as root. The chrooted environment still does not prevent the custom JS script in
|
|
|
|
# performing network operations and in generating XSS attacks as part of the report.
|
|
|
|
# The bottom line is that if people who are creating report templates or have write access to the DB cannot be trusted,
|
|
|
|
# then it's safer to switch off the reporting functionality below.
|
|
|
|
enabled=false
|