summaryrefslogtreecommitdiff
path: root/etc/dovecot/dovecot.conf
blob: b4001ada63310ba866df108239e23ded26848a4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# https://doc.dovecot.org/2.4.2/installation/upgrade/2.3-to-2.4.html#default-settings
# needed for 2.4
dovecot_config_version = 2.4.2
dovecot_storage_version = 2.4.2

# Edited from `doveconf -nP`, see https://doc.dovecot.org/2.3/configuration_manual/quick_configuration/#split-configuration-files
# https://doc.dovecot.org/2.4.2/installation/upgrade/2.3-to-2.4.html#converted-settings
# > mail_location setting & mail userdb field Split into multiple mail_* settings.
mail_driver = maildir
mail_path = ~/Mail
# https://doc.dovecot.org/2.4.1/core/config/mail_location.html#mail_inbox_path
mail_inbox_path = ~/Mail/Inbox
# https://doc.dovecot.org/2.4.1/core/config/mailbox_formats/maildir.html#directory-layout
# > use hierarchical directories, such as Maildir/folder/ Maildir/folder/subfolder/
mailbox_list_layout = fs
namespace inbox {
	inbox = yes
	# https://doc.dovecot.org/2.4.2/installation/upgrade/2.3-to-2.4.html#converted-settings
	# namespace { location } setting is changed in 2.4, it is kinda no need to
	# so I just removed, not remove will error
	mailbox Archive {
		auto = subscribe
		special_use = \Archive
	}
	mailbox Drafts {
		auto = subscribe
		special_use = \Drafts
	}
	mailbox Junk {
		auto = subscribe
		special_use = \Junk
	}
	mailbox Sent {
		auto = subscribe
		special_use = \Sent
	}
	mailbox Trash {
		auto = subscribe
		# https://doc.dovecot.org/configuration_manual/namespace/#core_setting-namespace/mailbox/autoexpunge
		# https://github.com/LukeSmithxyz/emailwiz/blob/558c4de108a472eca70abca20888de2981ff17ca/emailwiz.sh#L259
		# https://doc.dovecot.org/settings/types/#time
		autoexpunge = 30 days
		special_use = \Trash
	}
	prefix =
}
# https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html#passdb-userdb-section-naming
# > passdb and userdb sections now require a name
passdb some_name {
	driver = pam
}
service auth {
	unix_listener /var/spool/postfix/private/auth {
		group = postfix
		mode = 0666
		user = postfix
	}
}
ssl = required
# https://doc.dovecot.org/2.4.2/installation/upgrade/2.3-to-2.4.html#converted-settings
# ssl_cert, ssl_dh, ssl_key name changed
ssl_server_cert_file = /etc/postfix/flylightning.pem
ssl_server_dh_file = /etc/dovecot/dh.pem
ssl_server_key_file = /etc/postfix/flylightning.key
userdb some_name {
	driver = passwd
}
# https://doc.dovecot.org/2.4.2/installation/upgrade/2.3-to-2.4.html#default-settings
# > No protocols are enabled by default.
# In the past, imap pop3 lmtp are enabled by default. Now none I only need
# imaps, so I put imap here
protocols = imap