feat: add support for Dovecot deployment on Fedora 43 and 44 with systemd unit files and configuration templates
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{% if dovecot_users is defined and dovecot_users is iterable %}
|
||||
{% for user in dovecot_users %}
|
||||
{{ user.email }}:{{ user.password | password_hash('sha512') }}::::::
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,80 @@
|
||||
ssl_min_protocol = TLSv1.2
|
||||
ssl_cipher_list = PROFILE=SYSTEM
|
||||
ssl_server {
|
||||
cert_file = /etc/dovecot/certificates/pubcert.pem
|
||||
key_file = /etc/dovecot/certificates/privkey.pem
|
||||
}
|
||||
|
||||
mail_driver = maildir
|
||||
mail_path = /var/spool/mail/%{user | domain}/%{user | username}
|
||||
mail_privileged_group = mail
|
||||
first_valid_uid = 0
|
||||
mail_uid = mail
|
||||
mail_gid = mail
|
||||
mail_home = /var/spool/mail/%{user | domain}/%{user | username}
|
||||
|
||||
passdb passwd-file {
|
||||
driver = passwd-file
|
||||
passwd_file_path = /etc/dovecot/accounts
|
||||
default_password_scheme = SHA512-CRYPT
|
||||
auth_username_format = %{user}
|
||||
}
|
||||
userdb static {
|
||||
driver = static
|
||||
}
|
||||
|
||||
mail_plugins {
|
||||
quota = yes
|
||||
}
|
||||
|
||||
protocols {
|
||||
imap = yes
|
||||
lmtp = yes
|
||||
submission = yes
|
||||
}
|
||||
|
||||
service lmtp {
|
||||
inet_listener lmtp {
|
||||
address = 0.0.0.0 ::
|
||||
port = 24
|
||||
}
|
||||
}
|
||||
lmtp_add_received_header = yes
|
||||
|
||||
protocol lmtp {
|
||||
mail_plugins {
|
||||
sieve = yes
|
||||
}
|
||||
}
|
||||
|
||||
protocol imap {
|
||||
mail_plugins {
|
||||
imap_quota = yes
|
||||
}
|
||||
}
|
||||
|
||||
service quota-status {
|
||||
client_limit = 1
|
||||
executable = quota-status -p postfix
|
||||
inet_listener {
|
||||
# port = 12340
|
||||
}
|
||||
}
|
||||
|
||||
mailbox_list_index = yes
|
||||
protocol !indexer-worker {
|
||||
mail_vsize_bg_after_count = 100
|
||||
}
|
||||
|
||||
plugin {
|
||||
quota = count:User quota
|
||||
quota_rule = *:storage={{ dovecot_quota }}
|
||||
quota_rule2 = Trash:storage=+100M
|
||||
quota_rule3 = SPAM:ignore
|
||||
quota_vsizes = yes
|
||||
}
|
||||
|
||||
submission_relay_host = localhost
|
||||
protocol submission {
|
||||
mail_max_userip_connections = 10
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
## Dovecot configuration file
|
||||
|
||||
# Dovecot configuration version. This must be the first setting in the
|
||||
# configuration file. It specifies the configuration syntax, the used setting
|
||||
# names and the expected default values.
|
||||
dovecot_config_version = 2.4.4
|
||||
|
||||
# Dovecot storage file format version. It specifies the oldest Dovecot version
|
||||
# that must be able to read files written by this Dovecot instance. The
|
||||
# intention is that when upgrading Dovecot cluster, this setting is first kept
|
||||
# as the old Dovecot version. Once the cluster is fully upgraded to a new
|
||||
# version and there is no intention to rollback to the old version anymore,
|
||||
# this version number can be increased.
|
||||
dovecot_storage_version = 2.4.4
|
||||
|
||||
# The configuration below is a minimal configuration file using system user authentication.
|
||||
# See https://doc.dovecot.org/latest/core/config/quick.html
|
||||
|
||||
# Enable wanted protocols:
|
||||
protocols {
|
||||
imap = yes
|
||||
lmtp = yes
|
||||
}
|
||||
|
||||
mail_home = /home/%{user}
|
||||
mail_driver = maildir
|
||||
mail_path = ~/mail
|
||||
|
||||
# By default first_valid_uid is 1000. If your vmail user's UID is smaller,
|
||||
# you need to modify this:
|
||||
first_valid_uid = 1000
|
||||
|
||||
namespace inbox {
|
||||
inbox = yes
|
||||
separator = /
|
||||
}
|
||||
|
||||
# Authenticate as system users:
|
||||
passdb pam {
|
||||
}
|
||||
|
||||
userdb passwd {
|
||||
}
|
||||
|
||||
ssl = required
|
||||
ssl_cipher_list = PROFILE=SYSTEM
|
||||
|
||||
ssl_server {
|
||||
cert_file = /etc/pki/dovecot/certs/dovecot.pem
|
||||
key_file = /etc/pki/dovecot/private/dovecot.pem
|
||||
}
|
||||
|
||||
!include_try conf.d/*.conf
|
||||
Reference in New Issue
Block a user