mirror of
https://github.com/Unkn0wnCat/dotfiles.git
synced 2025-05-13 15:56:36 +02:00
Add relay configuration to maddy on amon
This commit is contained in:
parent
e963d33aac
commit
1136cccceb
1 changed files with 42 additions and 3 deletions
|
@ -64,9 +64,7 @@
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|
||||||
config = ''
|
config = ''
|
||||||
# Minimal configuration with TLS disabled, adapted from upstream example
|
$(relay_domains) = kevink.dev 1in9.net 1in1.net
|
||||||
# configuration here https://github.com/foxcpp/maddy/blob/master/maddy.conf
|
|
||||||
# Do not use this in production!
|
|
||||||
|
|
||||||
tls file /var/lib/acme/$(hostname)/fullchain.pem /var/lib/acme/$(hostname)/key.pem
|
tls file /var/lib/acme/$(hostname)/fullchain.pem /var/lib/acme/$(hostname)/key.pem
|
||||||
|
|
||||||
|
@ -103,6 +101,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
msgpipeline relay {
|
||||||
|
destination $(relay_domains) {
|
||||||
|
deliver_to &remote_queue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
smtp tcp://0.0.0.0:25 {
|
smtp tcp://0.0.0.0:25 {
|
||||||
limits {
|
limits {
|
||||||
all rate 20 1s
|
all rate 20 1s
|
||||||
|
@ -121,6 +125,9 @@
|
||||||
destination postmaster $(local_domains) {
|
destination postmaster $(local_domains) {
|
||||||
deliver_to &local_routing
|
deliver_to &local_routing
|
||||||
}
|
}
|
||||||
|
destination $(relay_domains) {
|
||||||
|
deliver_to &relay
|
||||||
|
}
|
||||||
default_destination {
|
default_destination {
|
||||||
reject 550 5.1.1 "User doesn't exist"
|
reject 550 5.1.1 "User doesn't exist"
|
||||||
}
|
}
|
||||||
|
@ -185,6 +192,38 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
target.remote relay_delivery {
|
||||||
|
limits {
|
||||||
|
destination rate 20 1s
|
||||||
|
destination concurrency 10
|
||||||
|
}
|
||||||
|
mx_auth {
|
||||||
|
dane
|
||||||
|
mtasts {
|
||||||
|
cache fs
|
||||||
|
fs_dir mtasts_cache/
|
||||||
|
}
|
||||||
|
local_policy {
|
||||||
|
min_tls_level encrypted
|
||||||
|
min_mx_level none
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
target.queue relay_queue {
|
||||||
|
target &relay_delivery
|
||||||
|
autogenerated_msg_domain $(primary_domain)
|
||||||
|
bounce {
|
||||||
|
destination postmaster $(local_domains) {
|
||||||
|
deliver_to &local_routing
|
||||||
|
}
|
||||||
|
default_destination {
|
||||||
|
# Return DSN to sender using outbound queue
|
||||||
|
deliver_to &remote_queue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
imap tcp://0.0.0.0:143 {
|
imap tcp://0.0.0.0:143 {
|
||||||
auth &local_authdb
|
auth &local_authdb
|
||||||
storage &local_mailboxes
|
storage &local_mailboxes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue