99 lines
2.9 KiB
TOML
99 lines
2.9 KiB
TOML
#############################################
|
|
# SMTP inbound session configuration
|
|
#############################################
|
|
|
|
[session]
|
|
timeout = "5m"
|
|
transfer-limit = 262144000 # 250 MB
|
|
duration = "10m"
|
|
|
|
[session.connect]
|
|
#script = "'connect'"
|
|
|
|
[session.ehlo]
|
|
require = true
|
|
reject-non-fqdn = [ { if = "listener = 'smtp'", then = true},
|
|
{ else = false } ]
|
|
#script = "'ehlo'"
|
|
|
|
[session.extensions]
|
|
pipelining = true
|
|
chunking = true
|
|
requiretls = true
|
|
no-soliciting = ""
|
|
dsn = [ { if = "!is_empty(authenticated_as)", then = true},
|
|
{ else = false } ]
|
|
expn = [ { if = "!is_empty(authenticated_as)", then = true},
|
|
{ else = false } ]
|
|
vrfy = [ { if = "!is_empty(authenticated_as)", then = true},
|
|
{ else = false } ]
|
|
future-release = [ { if = "!is_empty(authenticated_as)", then = "7d"},
|
|
{ else = false } ]
|
|
deliver-by = [ { if = "!is_empty(authenticated_as)", then = "15d"},
|
|
{ else = false } ]
|
|
mt-priority = [ { if = "!is_empty(authenticated_as)", then = "mixer"},
|
|
{ else = false } ]
|
|
|
|
[session.auth]
|
|
mechanisms = [ { if = "listener != 'smtp'", then = "[plain, login]"},
|
|
{ else = false } ]
|
|
directory = [ { if = "listener != 'smtp'", then = "'%{DEFAULT_DIRECTORY}%'" },
|
|
{ else = false } ]
|
|
require = [ { if = "listener != 'smtp'", then = true},
|
|
{ else = false } ]
|
|
allow-plain-text = false
|
|
|
|
[session.auth.errors]
|
|
total = 3
|
|
wait = "5s"
|
|
|
|
[session.mail]
|
|
#script = "mail-from"
|
|
#rewrite = [ { if = "listener != 'smtp' & matches('^([^.]+)@([^.]+)\\.(.+)$', rcpt)", then = "$1 + '@' + $3" },
|
|
# { else = false } ]
|
|
|
|
[session.rcpt]
|
|
#script = "greylist"
|
|
relay = [ { if = "!is_empty(authenticated_as)", then = true },
|
|
{ else = false } ]
|
|
#rewrite = [ { if = "is_local_domain('%{DEFAULT_DIRECTORY}%', rcpt_domain) & matches('^([^.]+)\\.([^.]+)@(.+)$', rcpt)", then = "$1 + '+' + $2 + '@' + $3" },
|
|
# { else = false } ]
|
|
max-recipients = 25
|
|
directory = "'%{DEFAULT_DIRECTORY}%'"
|
|
|
|
[session.rcpt.errors]
|
|
total = 5
|
|
wait = "5s"
|
|
|
|
[session.data]
|
|
script = [ { if = "is_empty(authenticated_as)", then = "'spam-filter'"},
|
|
{ else = "'track-replies'" } ]
|
|
|
|
[session.data.limits]
|
|
messages = 10
|
|
size = 104857600
|
|
received-headers = 50
|
|
|
|
[session.data.add-headers]
|
|
received = [ { if = "listener = 'smtp'", then = true },
|
|
{ else = false } ]
|
|
received-spf = [ { if = "listener = 'smtp'", then = true },
|
|
{ else = false } ]
|
|
auth-results = [ { if = "listener = 'smtp'", then = true },
|
|
{ else = false } ]
|
|
message-id = [ { if = "listener = 'smtp'", then = false },
|
|
{ else = true } ]
|
|
date = [ { if = "listener = 'smtp'", then = false },
|
|
{ else = true } ]
|
|
return-path = false
|
|
|
|
[[session.throttle]]
|
|
#match = "remote_ip = '10.0.0.1'"
|
|
key = ["remote_ip"]
|
|
concurrency = 5
|
|
#rate = "5/1h"
|
|
|
|
[[session.throttle]]
|
|
key = ["sender_domain", "rcpt"]
|
|
rate = "25/1h"
|