-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
161 lines (146 loc) · 3.69 KB
/
Copy pathconfig.example.yaml
File metadata and controls
161 lines (146 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# SRMTA Configuration File
# Copy to /etc/srmta/config.yaml and adjust for your environment
# Sub-configs in config.d/*.yaml are merged on top of this file (sorted alphabetically)
# Path to config.d/ directory (default: config.d/ next to this file)
config_dir: "/etc/srmta/config.d"
server:
hostname: "mta1.example.com"
listen_addr: ":8080"
max_workers: 100
shutdown_grace: "30s"
smtp:
inbound_addr: ":25" # Port for receiving mail (MX traffic)
submission_addr: ":587" # Port for MSA submission (authenticated clients)
outbound_port: 25 # Remote port used for outbound delivery
max_connections: 1000
max_message_size: 52428800 # 50MB
read_timeout: "60s"
write_timeout: "60s"
max_recipients: 100
require_auth: true
require_tls: false
banner_hostname: "mta1.example.com"
allowed_domains:
- "example.com"
- "mail.example.com"
allowed_domains_file: "/etc/srmta/allowed_domains.ini" # INI-format domain list
allowed_ips_file: "/etc/srmta/allowed_ips.ini" # INI-format IP/CIDR list
enable_pipelining: true
queue:
spool_dir: "/var/spool/srmta"
max_queue_depth: 500000
max_retries: 9
retry_intervals:
- "5m"
- "15m"
- "30m"
- "1h"
- "2h"
- "4h"
- "8h"
- "16h"
- "24h"
dead_letter_after: "72h"
journal_enabled: true
shard_count: 16
domain_buckets: 256
processing_workers: 50
delivery:
max_concurrent: 500
per_domain_concurrency: 20
connection_timeout: "300s"
dial_timeout: "30s"
ehlo_timeout: "30s"
mail_timeout: "30s"
rcpt_timeout: "30s"
data_timeout: "120s"
pool_size: 50
pool_idle_timeout: "60s"
dns:
servers:
- "8.8.8.8"
- "8.8.4.4"
- "1.1.1.1"
cache_ttl: "300s"
cache_size: 10000
timeout: "5s"
pool_size: 10
use_redis_cache: false
enable_dnssec: false
ip_pool:
ips:
- address: "203.0.113.10"
version: 4
weight: 100
warm_up: false
max_rate: 0
disabled: false
- address: "203.0.113.11"
version: 4
weight: 100
warm_up: true
max_rate: 500
disabled: false
- address: "2001:db8::1"
version: 6
weight: 50
warm_up: false
max_rate: 0
disabled: false
health_window: "1h"
disable_threshold: 0.3
recovery_time: "30m"
dkim:
enabled: true
default_key: "example.com:default"
keys:
- selector: "default"
domain: "example.com"
private_key_path: "/etc/srmta/dkim/example.com.key"
algorithm: "rsa-sha256"
- selector: "selector2"
domain: "mail.example.com"
private_key_path: "/etc/srmta/dkim/mail.example.com.key"
algorithm: "rsa-sha256"
bounce:
hard_bounce_threshold: 0.05 # 5%
soft_bounce_threshold: 0.15 # 15%
complaint_threshold: 0.003 # 0.3%
sender_pause_enabled: true
suppression_list_enabled: true
logging:
level: "info" # debug, info, warn, error
format: "json" # json, text
output: "stdout" # stdout, file
file_path: "/var/log/srmta/srmta.log"
max_size_mb: 100
max_backups: 10
max_age_days: 30
compress: true
metrics:
enabled: true
listen_addr: ":9090"
path: "/metrics"
database:
host: "${DB_HOST:localhost}"
port: 5432
user: "${DB_USER:srmta}"
password: "${DB_PASSWORD:changeme}"
dbname: "${DB_NAME:srmta}"
ssl_mode: "prefer"
max_open_conns: 25
max_idle_conns: 5
redis:
addr: "${REDIS_ADDR:localhost:6379}"
password: "${REDIS_PASSWORD:}"
db: 0
pool_size: 10
tls:
cert_file: "/etc/srmta/tls/server.crt"
key_file: "/etc/srmta/tls/server.key"
ca_file: "/etc/srmta/tls/ca.crt"
min_version: "1.2"
rate_limit:
global_rate: 500 # emails/sec
per_domain_rate: 50 # emails/sec per domain
per_sender_rate: 100 # emails/sec per sender