Config file changes

This commit is contained in:
mdecimus
2024-03-20 12:03:10 +01:00
parent 9a4110e343
commit 7e1a95c1ee
21 changed files with 126 additions and 93 deletions

View File

@@ -0,0 +1,35 @@
#############################################
# Cache configuration
#############################################
[cache]
capacity = 512
shard = 32
[cache.session]
ttl = "1h"
[cache.account]
size = 2048
[cache.mailbox]
size = 2048
[cache.thread]
size = 2048
[cache.bayes]
capacity = 8192
[cache.bayes.ttl]
positive = "1h"
negative = "1h"
[cache.resolver]
txt = 2048
mx = 1024
ipv4 = 1024
ipv6 = 1024
ptr = 1024
tlsa = 1024
mta-sts = 1024

View File

@@ -9,9 +9,9 @@ max-connections = 8192
#[server.proxy]
#trusted-networks = ["127.0.0.0/8", "::1", "10.0.0.0/8"]
[server.security]
blocked-networks = {}
[authentication]
fail2ban = "100/1d"
rate-limit = "10/1m"
[server.run-as]
user = "stalwart-mail"
@@ -29,5 +29,9 @@ backlog = 1024
#tos = 1
[global]
shared-map = {shard = 32, capacity = 10}
#thread-pool = 8
[server.http]
#headers = ["Access-Control-Allow-Origin: *",
# "Access-Control-Allow-Methods: POST, GET, PATCH, PUT, DELETE, HEAD, OPTIONS",
# "Access-Control-Allow-Headers: Authorization, Content-Type, Accept, X-Requested-With"]

View File

@@ -13,10 +13,7 @@ directory = "%{DEFAULT_DIRECTORY}%"
enable = true
append = false
[storage.spam]
header = "X-Spam-Status: Yes"
[storage.fts]
[storage.full-text]
default-language = "en"
[storage.cluster]

View File

@@ -15,6 +15,7 @@ files = [ "%{BASE_PATH}%/etc/common/server.toml",
"%{BASE_PATH}%/etc/common/store.toml",
"%{BASE_PATH}%/etc/common/tracing.toml",
"%{BASE_PATH}%/etc/common/sieve.toml",
"%{BASE_PATH}%/etc/common/cache.toml",
"%{BASE_PATH}%/etc/directory/imap.toml",
"%{BASE_PATH}%/etc/directory/internal.toml",
"%{BASE_PATH}%/etc/directory/ldap.toml",

View File

@@ -2,9 +2,5 @@
# JMAP authentication & session configuration
#############################################
[jmap.session.cache]
ttl = "1h"
size = 100
[jmap.session.purge]
frequency = "15 * *"

View File

@@ -14,6 +14,3 @@ auth-code = "10m"
token = "1h"
refresh-token = "30d"
refresh-token-renew = "4d"
[oauth.cache]
size = 128

View File

@@ -41,8 +41,3 @@ max-items = 10
[jmap.principal]
allow-lookups = true
[jmap.http]
#headers = ["Access-Control-Allow-Origin: *",
# "Access-Control-Allow-Methods: POST, GET, PATCH, PUT, DELETE, HEAD, OPTIONS",
# "Access-Control-Allow-Headers: Authorization, Content-Type, Accept, X-Requested-With"]

View File

@@ -5,9 +5,5 @@
[jmap.rate-limit]
account = "1000/1m"
authentication = "10/1m"
anonymous = "100/1m"
use-forwarded = false
[jmap.rate-limit.cache]
size = 1024

View File

@@ -11,12 +11,3 @@ attempts = 2
try-tcp-on-error = true
public-suffix = ["https://publicsuffix.org/list/public_suffix_list.dat",
"file://%{BASE_PATH}%/etc/spamfilter/maps/suffix_list.dat.gz"]
[resolver.cache]
txt = 2048
mx = 1024
ipv4 = 1024
ipv6 = 1024
ptr = 1024
tlsa = 1024
mta-sts = 1024

View File

@@ -2,6 +2,31 @@
# SMTP Spam & Phishing filter configuration
#############################################
[spam.header]
add-spam = true
add-spam-result = true
is-spam = "X-Spam-Status: Yes"
[spam.autolearn]
enable = true
balance = 0.9
[spam.autolearn.ham]
replies = true
threshold = -0.5
[spam.autolearn.spam]
threshold = 6.0
[spam.threshold]
spam = 5.0
discard = 0
reject = 0
[spam.data]
directory = ""
lookup = ""
[store."spam/free-domains"]
type = "memory"
format = "glob"

View File

@@ -1,35 +1,35 @@
# Whether to add an X-Spam-Status header
let "ADD_HEADER_SPAM" "true";
let "ADD_HEADER_SPAM" "%{cfg:spam.header.add-spam}%";
# Whether to add an X-Spam-Result header
let "ADD_HEADER_SPAM_RESULT" "true";
let "ADD_HEADER_SPAM_RESULT" "%{cfg:spam.header.add-spam-result}%";
# Whether message replies from authenticated users should be learned as ham
let "AUTOLEARN_REPLIES_HAM" "true";
let "AUTOLEARN_REPLIES_HAM" "%{cfg:spam.autolearn.ham.replies}%";
# Whether the bayes classifier should be trained automatically
let "AUTOLEARN_ENABLE" "true";
let "AUTOLEARN_ENABLE" "%{cfg:spam.autolearn.enable}%";
# When to learn ham (score >= threshold)
let "AUTOLEARN_HAM_THRESHOLD" "-0.5";
let "AUTOLEARN_HAM_THRESHOLD" "%{cfg:spam.autolearn.ham.threshold}%";
# When to learn spam (score <= threshold)
let "AUTOLEARN_SPAM_THRESHOLD" "6.0";
let "AUTOLEARN_SPAM_THRESHOLD" "%{cfg:spam.autolearn.spam.threshold}%";
# Keep difference for spam/ham learns for at least this value
let "AUTOLEARN_SPAM_HAM_BALANCE" "0.9";
let "AUTOLEARN_SPAM_HAM_BALANCE" "%{cfg:spam.autolearn.balance}%";
# If ADD_HEADER_SPAM is enabled, mark as SPAM messages with a score above this threshold
let "SCORE_SPAM_THRESHOLD" "5.0";
let "SCORE_SPAM_THRESHOLD" "%{cfg:spam.threshold.spam}%";
# Discard messages with a score above this threshold
let "SCORE_DISCARD_THRESHOLD" "0";
let "SCORE_DISCARD_THRESHOLD" "%{cfg:spam.threshold.discard}%";
# Reject messages with a score above this threshold
let "SCORE_REJECT_THRESHOLD" "0";
let "SCORE_REJECT_THRESHOLD" "%{cfg:spam.threshold.reject}%";
# Directory name to use for local domain lookups (leave empty for default)
let "DOMAIN_DIRECTORY" "";
let "DOMAIN_DIRECTORY" "%{cfg:spam.data.directory}%";
# Store to use for Bayes tokens and ids (leave empty for default)
let "SPAM_DB" "";
let "SPAM_DB" "%{cfg:spam.data.lookup}%";