Begin writing the OpenSMTPD config

This commit is contained in:
h3artbl33d 2024-05-11 12:45:12 +02:00
parent 4d2dfd0c50
commit 04da2e80cd

View File

@ -0,0 +1,30 @@
###
# Options
queue compression
queue encryption 5f8683f56925a520df1847dd2e1e87f3 # Generate with openssl rand -hex 16
smtp max-message-size 30M
smtp ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384"
###
# PKI
pki {{ config.mail_domain }} cert /var/lib/acme/live/{{ config.mail_domain }}/fullchain
pki {{ config.mail_domain }} key /var/lib/acme/live/{{ config.mail_domain }}/privkey
pki {{ config.mail_domain }} dhe auto
###
# Tables
table aliases file:/etc/mail/aliases
table users file:/etc/mail/users
table passdb file:/etc/mail/passdb
table local { "{{ config.mail_domain }}" }
###
# Connections
listen on egress port 25 tls pki {{ config.mail_domain }} tag MTA
listen on egress port 465 smtps pki {{ config.mail_domain }} auth <passdb> received-auth mask-src tag MSA
listen on egress port 587 tls-require pki {{ config.mail_domain }} auth <passdb> received-auth mask-src tag MSA
###
# Actions
action "forward" forward-only alias <aliases>
action "mda" mda "/usr/local/libexec/dovecot/dovecot-lda -a %{rcpt} -d %{dest} -f %{mbox.from}" virtual <users> wrapper "dovecot"