Remove MySQL and use dynamic file based accounts instead.
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
{% if dovecot_mysql_server is defined and dovecot_mysql_database is defined and dovecot_mysql_username is defined and dovecot_mysql_password is defined %}
|
||||
driver = mysql
|
||||
connect = host={{ dovecot_mysql_server }} dbname={{ dovecot_mysql_database }} user={{ dovecot_mysql_username }} password={{ dovecot_mysql_password }}
|
||||
default_pass_scheme = SHA512-CRYPT
|
||||
password_query = SELECT email AS user, password FROM virtual_users WHERE email='%u';
|
||||
user_query = SELECT email AS user FROM virtual_users WHERE email='%u';
|
||||
iterate_query = SELECT email AS user FROM users;
|
||||
{% endif %}
|
@@ -1,10 +1,62 @@
|
||||
!include conf.d/auth-sql.conf.ext
|
||||
|
||||
ssl_min_protocol = TLSv1.2
|
||||
ssl_cipher_list = PROFILE=SYSTEM
|
||||
ssl_cert = </etc/dovecot/certificates/pubcert.pem
|
||||
ssl_key = </etc/dovecot/certificates/privkey.pem
|
||||
|
||||
mail_location = maildir:/var/spool/mail/%d/%n
|
||||
mail_privileged_group = mail
|
||||
first_valid_uid = 0
|
||||
mail_uid = mail
|
||||
mail_gid = mail
|
||||
ssl_min_protocol = TLSv1.2
|
||||
ssl_cipher_list = PROFILE=SYSTEM
|
||||
ssl_cert = </etc/dovecot/certificates/pubcert.pem
|
||||
ssl_key = </etc/dovecot/certificates/privkey.pem
|
||||
|
||||
passdb {
|
||||
driver = passwd-file
|
||||
args = username_format=%n /etc/dovecot/accounts/%d/etc/passwd
|
||||
}
|
||||
userdb {
|
||||
driver = passwd-file
|
||||
args = username_format=%n scheme=SHA512-CRYPT /etc/dovecot/accounts/%d/etc/passwd
|
||||
default_fields = uid=mail gid=mail home=/var/spool/mail/%d/%u
|
||||
}
|
||||
|
||||
mail_plugins = $mail_plugins quota
|
||||
protocols = imap lmtp
|
||||
|
||||
service lmtp {
|
||||
inet_listener lmtp {
|
||||
address = 0.0.0.0 ::
|
||||
port = 24
|
||||
}
|
||||
}
|
||||
lmtp_add_received_header = yes
|
||||
protocol lmtp {
|
||||
mail_plugins = $mail_plugins sieve
|
||||
}
|
||||
|
||||
protocol imap {
|
||||
mail_plugins = $mail_plugins imap_quota
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user