Skip to main content

Reference

Below you will find an annotated template of an example configuration file.

data/config.json
{
"email": {
"SMTP": {
"sendEmail": false, // if false: use debug dummy egress
"transport": { // egress transport.
"type": "ses", // 'ses' | 'smtp'
"smtp": { // SMTP server configuration
"host": "your-mailserver.example.com",
"port": 465,
"secure": true,
"auth": {
"user": "username@your-mailserver.example.com",
"pass": "<password>"
}
}
},
"scheduler": { // Verify ratelimits with your provider
"ratelimit": { // values for SES production mode
"maxPerSecond": 14,
"maxPerMinute": 30,
"maxPerHour": 200,
"maxPerDay": 300
}
}
},
"inbound": { // configuration of ingress modules
"imap": { // configure your IMAP server
"enabled": false,
"host": "your-mailserver.example.com",
"port": 993,
"secure": true,
"auth": {
"user": "username@your-mailserver.example.com",
"pass": "<password>"
},
"mailbox": "INBOX",
"pollIntervalSeconds": 30
},
"ses": {
"sns": {
// anything not from this ARN will be dropped.
"topicArn": "arn:aws:sns:<region>:<...>:<topicName>"
}
}
},
"outbound": {
"bounceAddress": "" // address for bounce notifications
},
"unsubscribe": {
"expiresIn": 0,
"JWT": {
"key": "<secretKey>"
}
}
},
"auth": {
"otp": {
"email": { // Email OTP config
// template values: code -> otp code.
// link -> one-click prefilled link
// expiresIn.en: humanized lifetime duration of token (english)
// expiresIn.de: humanized lifetime duration of token (german)
// appName -> config.ui.app.name
"source": "noreply@testmail.stevetec.de",
"subject": "{{appName}} Login",
"template": "OTP:{{code}}. MagicLink: {{link}}. Expires: {{expiresIn.en}}",
"priority": 1200
},
"expiry": {
"inSeconds": 900 // lifetime in seconds
}
},
"whitelist": {
"global": {
"DO_NOT_CHANGE": { // we are serious.
"enabled": true // globally enable allowlist
}
}
}
},
"api": { // non-webUI interactions with MailFlow Relay
"listManager": {
"postfix": {
"subscribe": "-subscribe", // set to '' to disable
"unsubscribe": "-unsubscribe" // set to '' to disable
}
}
},
"aws": { // configure AWS access for SES
"region": "eu-central-1",
"auth": {
"accessKeyId": "<keyId>",
"secretAccessKey": "<keySecret>"
}
},
"ui": { // Display settings for webUI
"app": {
"name": "MailFlow Relay",
"icon_FILE": "static/ui/logo.webp"
}
},
"server": { // used for URLs and email generation
"domain": {
"web": "mailflow.example.com",
"email": "email.example.com"
}
}
}

WHile you can edit your configuration directly on disk the more end-user friendly editing style is via the configuration editor available to instance administrators. Changes on disk are only applied on system start.

info

Config changes done via the web config editor automatically get applied to the running system and persisted to disk, no restarts required.