Add dovecot/.*

This commit is contained in:
Shin'ya Minazuki
2025-12-09 10:54:18 +09:00
parent 7f942e588a
commit 84901f884c
2 changed files with 101 additions and 0 deletions

2
dovecot/README.md Normal file
View File

@@ -0,0 +1,2 @@
# Dovecot
The mail server component that everyone uses, the included file in particular is based on [laidback.moe](https://laidback.moe)'s own, which in turn is based on [nishi.boats](https://nishi.boats)'s own.

99
dovecot/dovecot.conf Normal file
View File

@@ -0,0 +1,99 @@
# Listen on all IPv4 and IPv6 addresses
listen = *, ::
# Directory in which extensions can be loaded and runtime data saved
base_dir = /var/run/dovecot
mail_plugin_dir = /usr/lib/dovecot
# Identifier used for the process list and the system logger
instance_name = dovecot
# List of protocols to support
protocols = imap lmtp pop3
# Secure Sockets Layer / Transport Layer Security
ssl = yes
ssl_cert = </etc/letsencrypt/live/chaotic.ninja/fullchain.pem
ssl_key = </etc/letesncrypt/live/chaotic.ninja/privkey.pem
# Authentication settings
auth_mechanisms = plain login
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
auth_username_format = %n
disable_plaintext_auth = no
passdb {
driver = pam
}
userdb {
driver = passwd
}
# Mailboxes
mail_location = maildir:~/Maildir
mailbox_list_index = yes
mail_uid = dovecot
mail_gid = mail
namespace inbox {
type = private
inbox = yes
mailbox Archive {
special_use = \Archive
auto = create
}
mailbox Drafts {
special_use = \Drafts
auto = create
}
mailbox Sent {
special_use = \Sent
auto = create
}
mailbox Junk {
special_use = \Junk
auto = create
autoexpunge = 30d
}
mailbox Trash {
special_use = \Trash
auto = create
autoexpunge = 7d
}
}
# Plugins
plugin {
sieve = yes
sieve_after = /etc/dovecot/sieve
}
# Protocol settings
protocol lmtp {
mail_plugins = $mail_plugins sieve
}
# Service settings
service auth {
unix_listener auth-userdb {
mode = 0660
user = dovecot
group = mail
}
}
service lmtp {
unix_listener lmtp {
mode = 0660
user = dovecot
group = mail
}
}
# Valid user and group identifiers
first_valid_uid = 1000
last_valid_uid = 2000
first_valid_gid = 12
last_valid_gid = 984