Personal Ansible recipes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB

# Location of TLS certificate and private key. Global directive is used for all
# endpoints.
tls /etc/maddy/maddy.crt.pem /etc/maddy/maddy.key.pem
# hostname is used in several places, mainly in greeting for IMAP and SMTP.
hostname {{ domain }}
log stderr
# Create and initialize sql module, it provides simple authentication and
# storage backend using one database for everything.
sql {
driver postgres
dsn "user=maddy dbname=maddy_prod host=/run/postgresql"
}
smtp smtp://[::]:25 {
auth sql
# Verify that hostname in EHLO/HELO resolves to the source IP. Fail if it is not.
filter check_source_hostname
# Deliver all mail into sql module storage
destination {{ domain }} {
deliver sql
}
}
submission smtps://[::]:465 smtp://[::]:587 {
# Use sql module for authentication.
auth sql
# Deliver all mail for @example.org into sql module storage.
destination {{ domain }} {
deliver sql
}
# No remote delivery is implemented now, just deliver it to /dev/null for now.
deliver out-queue
}
imap imaps://[::]:993 imap://[::]:143 {
auth sql
storage sql
}