mirror of
https://github.com/stalwartlabs/smtp-server.git
synced 2024-11-25 00:37:44 +00:00
391 lines
10 KiB
TOML
391 lines
10 KiB
TOML
[server]
|
|
hostname = "mx.example.org"
|
|
greeting = "Stalwart SMTP at your service"
|
|
protocol = "smtp"
|
|
|
|
[server.listener."smtp"]
|
|
bind = ["0.0.0.0:9025"]
|
|
tls.implicit = false
|
|
|
|
[server.listener."smtps"]
|
|
bind = ["0.0.0.0:9465"]
|
|
#tls.sni = [{subject = "domain.org", pki = "abc"}]
|
|
#socket.backlog = 1024
|
|
|
|
[server.listener."submission"]
|
|
bind = ["0.0.0.0:9587"]
|
|
#tls = {implicit = true}
|
|
|
|
[server.tls]
|
|
enable = true
|
|
implicit = true
|
|
timeout = "1m"
|
|
certificate = "default"
|
|
#sni = [{subject = "domain.org", pki = "abc"}]
|
|
#protocols = ["TLSv1.2", TLSv1.3"]
|
|
#ciphers = []
|
|
ignore-client-order = true
|
|
|
|
[server.socket]
|
|
reuse-addr = true
|
|
#reuse-port = true
|
|
backlog = 1024
|
|
#ttl = 3600
|
|
#send-buffer-size = 65535
|
|
#recv-buffer-size = 65535
|
|
#linger = 1
|
|
#tos = 1
|
|
|
|
[global]
|
|
log-level = "trace"
|
|
concurrency = 1024
|
|
throttle-map = {shard = 32, capacity = 10}
|
|
|
|
[session]
|
|
timeout = "5m"
|
|
transfer-limit = 5000000
|
|
duration = "10m"
|
|
|
|
[session.connect]
|
|
#script = "connect.sieve"
|
|
|
|
[session.ehlo]
|
|
require = true
|
|
#script = ehlo.sieve
|
|
|
|
[session.extensions]
|
|
pipelining = true
|
|
chunking = true
|
|
requiretls = true
|
|
no-soliciting = ""
|
|
dsn = true
|
|
future-release = [
|
|
{ if = "listener", eq = "submission", then = "5d"},
|
|
{ else = false }
|
|
]
|
|
deliver-by = false
|
|
mt-priority = false
|
|
|
|
[session.auth]
|
|
mechanisms = [
|
|
{ if = "listener", eq = "submission", then = ["plain", "login"]},
|
|
{ else = false }
|
|
]
|
|
lookup = [ { if = "listener", eq = "submission", then = "local-addresses" },
|
|
{ else = false } ]
|
|
|
|
[session.auth.errors]
|
|
total = 3
|
|
wait = "5s"
|
|
|
|
[session.mail]
|
|
#script = mail-from.sieve
|
|
timeout = 10
|
|
|
|
[session.rcpt]
|
|
#script = rcpt-to.sieve
|
|
relay = [ { if = "authenticated-as", ne = "", then = true },
|
|
{ else = false } ]
|
|
max-recipients = 100
|
|
|
|
[session.rcpt.lookup]
|
|
domains = "local-domains"
|
|
addresses = "local-addresses"
|
|
vrfy = [ { if = "authenticated-as", ne = "", then = "local-addresses" },
|
|
{ else = false } ]
|
|
expn = [ { if = "authenticated-as", ne = "", then = "local-addresses" },
|
|
{ else = false } ]
|
|
|
|
[session.rcpt.errors]
|
|
total = 3
|
|
wait = "5s"
|
|
|
|
[session.data]
|
|
#script = data.sieve
|
|
|
|
[session.data.limits]
|
|
messages = 10
|
|
size = 100000
|
|
received-headers = 50
|
|
mime-parts = 50
|
|
nested-messages = 3
|
|
|
|
[session.data.add-headers]
|
|
received = true
|
|
received-spf = true
|
|
return-path = true
|
|
auth-results = true
|
|
message-id = true
|
|
date = true
|
|
|
|
[[session.throttle]]
|
|
match = {if = "remote-ip", eq = "127.0.0.1"}
|
|
key = ["remote-ip", "authenticated-as"]
|
|
concurrency = 100
|
|
rate = "50/30s"
|
|
|
|
[[session.throttle]]
|
|
key = "sender-domain"
|
|
concurrency = 10000
|
|
|
|
[auth.iprev]
|
|
verify = "strict"
|
|
|
|
[auth.dkim]
|
|
verify = "strict"
|
|
sign = true
|
|
|
|
[auth.signature."default"]
|
|
public-key = "cert-name"
|
|
private-key = "cert-name"
|
|
domain = "example.org"
|
|
selector = ""
|
|
headers = ["From", "To", "Date", "Subject", "Message-ID"]
|
|
algorithm = "rsa-sha256"
|
|
canonicalization = "simple/relaxed"
|
|
expire = "10d"
|
|
third-party = ""
|
|
third-party-algo = ""
|
|
auid = ""
|
|
set-body-length = false
|
|
report = true
|
|
|
|
[auth.spf]
|
|
verify.ehlo = "relaxed"
|
|
verify.mail-from = "relaxed"
|
|
|
|
[auth.arc]
|
|
verify = "strict"
|
|
seal = true
|
|
|
|
[auth.dmarc]
|
|
verify = "strict"
|
|
|
|
[remote."lmtp"]
|
|
address = 192.168.0.1
|
|
port = 25
|
|
protocol = "lmtp"
|
|
|
|
[remote."lmtp".auth]
|
|
username = "hello"
|
|
secret = "world"
|
|
|
|
[remote."lmtp".cache]
|
|
entries = 1000
|
|
ttl = {positive = 10, negative = 5}
|
|
|
|
[remote."lmtp".tls]
|
|
implicit = true
|
|
allow-invalid-certs = true
|
|
|
|
[queue]
|
|
path = "/var/spool/queue"
|
|
hash = 123
|
|
|
|
[queue.schedule]
|
|
retry = ["0m", "2m", "5m", "10m", "15m", "30m", "1h", "2h"]
|
|
notify = ["1d", "3d"]
|
|
expire = "5d"
|
|
|
|
[queue.outbound]
|
|
#hostname = mx.domain.org
|
|
next-hop = "lmtp"
|
|
|
|
[queue.outbound.tls]
|
|
dane = require
|
|
mta-sts = disabled
|
|
starttls = optional
|
|
|
|
[queue.outbound.source-ip]
|
|
v4 = ["192.168.0.2", "162.168.0.1"]
|
|
v6 = ["192.168.0.2", "162.168.0.1"]
|
|
|
|
[queue.outbound.limits]
|
|
mx = 5
|
|
multihomed = 2
|
|
|
|
[queue.outbound.timeouts]
|
|
connect = "1m"
|
|
greeting = "1m"
|
|
tls = "1m"
|
|
ehlo = "1m"
|
|
mail-from = "1m"
|
|
rcpt-to = "1m"
|
|
data = "5m"
|
|
mta-sts = "1m"
|
|
|
|
[[queue.quota]]
|
|
match = {if = "remote-ip", eq = "127.0.0.1"}
|
|
key = [""]
|
|
messages = 10000
|
|
size = 1000000
|
|
|
|
[[queue.throttle]]
|
|
rate = "1/60s"
|
|
concurrency = 1000
|
|
key = ["remote-ip"]
|
|
|
|
[resolver]
|
|
type = "cloudflare"
|
|
strategy = "ipv6"
|
|
dnssec = true
|
|
preserve-intermediates = true
|
|
concurrency = 2
|
|
timeout = 100
|
|
attempts = 3
|
|
try-tcp-on-error = true
|
|
|
|
[resolver.cache]
|
|
a = 1000
|
|
mx = 9393
|
|
txt = 3233
|
|
tlsa = 333
|
|
|
|
|
|
[scripts]
|
|
|
|
[scripts]
|
|
ehlo = "this is my script"
|
|
|
|
[list."local-domains"]
|
|
type = "inline"
|
|
items = ["example.org", "*.example.net"]
|
|
|
|
[list."local-addresses"]
|
|
type = "remote"
|
|
host = "lmtp"
|
|
|
|
#[list."local-users"]
|
|
#type = "file"
|
|
#path = "/tmp/file.txt"
|
|
|
|
[report.dsn]
|
|
from-name = "Mail Delivery Subsystem"
|
|
from-address = "MAILER-DAEMON@domain.org"
|
|
subject = "Delivery Status Notification"
|
|
sign-with = []
|
|
|
|
[report.dkim]
|
|
from-name = "Autentication Report"
|
|
from-address = "noreply-auth-failure"
|
|
subject = "SPF Authentication Failure Report"
|
|
send-rate = "1/20d"
|
|
analyze = true
|
|
|
|
[report.spf]
|
|
from-name = "Autentication Report"
|
|
from-address = "noreply-auth-failure"
|
|
subject = "SPF Authentication Failure Report"
|
|
sign-with = []
|
|
send-rate = "1/20d"
|
|
analyze = true
|
|
|
|
[report.dmarc]
|
|
from-name = "DMARC report"
|
|
from-address = "noreply-dmarc"
|
|
subject = "DMARC aggregate report for $1"
|
|
send-rate = "1/20d"
|
|
sign-with = []
|
|
aggregate-frequency = never
|
|
analyze = true
|
|
|
|
[report.tls]
|
|
from-name = "Autentication Report"
|
|
from-address = "noreply-auth-failure"
|
|
subject = "TLS Failure Report"
|
|
send-rate = "1/30d"
|
|
analyze = true
|
|
sign-with = []
|
|
|
|
[servers."relay".dmarc]
|
|
send-reports = true
|
|
#report-frequency = requested, 86400
|
|
incoming-address = "dmarc@*"
|
|
|
|
[certificate]
|
|
[certificate."default"]
|
|
cert = '''
|
|
-----BEGIN CERTIFICATE-----
|
|
MIIFCTCCAvGgAwIBAgIUCgHGQYUqtelbHGVSzCVwBL3fyEUwDQYJKoZIhvcNAQEL
|
|
BQAwFDESMB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