|
|
@ -16,37 +16,40 @@ import uuid
|
|
|
|
app = flask.Flask(__name__)
|
|
|
|
app = flask.Flask(__name__)
|
|
|
|
|
|
|
|
|
|
|
|
default_config = {
|
|
|
|
default_config = {
|
|
|
|
|
|
|
|
# Specific to the admin UI
|
|
|
|
'SQLALCHEMY_DATABASE_URI': 'sqlite:////data/main.db',
|
|
|
|
'SQLALCHEMY_DATABASE_URI': 'sqlite:////data/main.db',
|
|
|
|
'SQLALCHEMY_TRACK_MODIFICATIONS': False,
|
|
|
|
'SQLALCHEMY_TRACK_MODIFICATIONS': False,
|
|
|
|
'INSTANCE_ID_PATH': '/data/instance',
|
|
|
|
|
|
|
|
'STATS_ENDPOINT': '0.{}.stats.mailu.io',
|
|
|
|
|
|
|
|
'SECRET_KEY': 'changeMe',
|
|
|
|
|
|
|
|
'DOCKER_SOCKET': 'unix:///var/run/docker.sock',
|
|
|
|
'DOCKER_SOCKET': 'unix:///var/run/docker.sock',
|
|
|
|
'HOSTNAMES': 'mail.mailu.io',
|
|
|
|
|
|
|
|
'DOMAIN': 'mailu.io',
|
|
|
|
|
|
|
|
'POSTMASTER': 'postmaster',
|
|
|
|
|
|
|
|
'SITENAME': 'Mailu',
|
|
|
|
|
|
|
|
'WEBSITE': 'https://mailu.io',
|
|
|
|
|
|
|
|
'DEBUG': False,
|
|
|
|
|
|
|
|
'BOOTSTRAP_SERVE_LOCAL': True,
|
|
|
|
|
|
|
|
'DKIM_PATH': '/dkim/{domain}.{selector}.key',
|
|
|
|
|
|
|
|
'DKIM_SELECTOR': 'dkim',
|
|
|
|
|
|
|
|
'DMARC_RUA': None,
|
|
|
|
|
|
|
|
'DMARC_RUF': None,
|
|
|
|
|
|
|
|
'BABEL_DEFAULT_LOCALE': 'en',
|
|
|
|
'BABEL_DEFAULT_LOCALE': 'en',
|
|
|
|
'BABEL_DEFAULT_TIMEZONE': 'UTC',
|
|
|
|
'BABEL_DEFAULT_TIMEZONE': 'UTC',
|
|
|
|
'FRONTEND': 'none',
|
|
|
|
'BOOTSTRAP_SERVE_LOCAL': True,
|
|
|
|
'TLS_FLAVOR': 'cert',
|
|
|
|
|
|
|
|
'CERTS_PATH': '/certs',
|
|
|
|
|
|
|
|
'PASSWORD_SCHEME': 'SHA512-CRYPT',
|
|
|
|
|
|
|
|
'WEBMAIL': 'none',
|
|
|
|
|
|
|
|
'AUTH_RATELIMIT': '10/minute;1000/hour',
|
|
|
|
|
|
|
|
'RATELIMIT_STORAGE_URL': 'redis://redis',
|
|
|
|
'RATELIMIT_STORAGE_URL': 'redis://redis',
|
|
|
|
|
|
|
|
'DEBUG': False,
|
|
|
|
|
|
|
|
# Statistics management
|
|
|
|
|
|
|
|
'INSTANCE_ID_PATH': '/data/instance',
|
|
|
|
|
|
|
|
'STATS_ENDPOINT': '0.{}.stats.mailu.io',
|
|
|
|
|
|
|
|
# Common configuration variables
|
|
|
|
|
|
|
|
'SECRET_KEY': 'changeMe',
|
|
|
|
|
|
|
|
'DOMAIN': 'mailu.io',
|
|
|
|
|
|
|
|
'HOSTNAMES': 'mail.mailu.io,alternative.mailu.io,yetanother.mailu.io',
|
|
|
|
|
|
|
|
'POSTMASTER': 'postmaster',
|
|
|
|
|
|
|
|
'TLS_FLAVOR': 'cert',
|
|
|
|
|
|
|
|
'AUTH_RATELIMIT': '10/minute;1000/hour',
|
|
|
|
'DISABLE_STATISTICS': 'False',
|
|
|
|
'DISABLE_STATISTICS': 'False',
|
|
|
|
|
|
|
|
# Mail settings
|
|
|
|
|
|
|
|
'DMARC_RUA': None,
|
|
|
|
|
|
|
|
'DMARC_RUF': None,
|
|
|
|
'WELCOME': 'False',
|
|
|
|
'WELCOME': 'False',
|
|
|
|
'WELCOME_SUBJECT': 'Dummy welcome topic',
|
|
|
|
'WELCOME_SUBJECT': 'Dummy welcome topic',
|
|
|
|
'WELCOME_BODY': 'Dummy welcome body',
|
|
|
|
'WELCOME_BODY': 'Dummy welcome body',
|
|
|
|
'WEB_ADMIN': '/admin'
|
|
|
|
'DKIM_SELECTOR': 'dkim',
|
|
|
|
|
|
|
|
'DKIM_PATH': '/dkim/{domain}.{selector}.key',
|
|
|
|
|
|
|
|
# Web settings
|
|
|
|
|
|
|
|
'SITENAME': 'Mailu',
|
|
|
|
|
|
|
|
'WEBSITE': 'https://mailu.io',
|
|
|
|
|
|
|
|
'WEB_ADMIN': '/admin',
|
|
|
|
|
|
|
|
# Advanced settings
|
|
|
|
|
|
|
|
'PASSWORD_SCHEME': 'SHA512-CRYPT',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Load configuration from the environment if available
|
|
|
|
# Load configuration from the environment if available
|
|
|
|