fix: config Dovecot 2.4 (dovecot_config_version + nouvelle syntaxe passdb/userdb)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
21
install.sh
21
install.sh
@@ -156,22 +156,29 @@ chown root:dovecot /etc/dovecot/users
|
||||
chmod 640 /etc/dovecot/users
|
||||
|
||||
cat > /etc/dovecot/dovecot.conf << DOVECOT
|
||||
dovecot_config_version = 2.4.0
|
||||
dovecot_storage_version = 2.4.0
|
||||
|
||||
protocols = imap
|
||||
listen = *
|
||||
|
||||
mail_location = maildir:/var/mail/vhosts/%d/%n/Maildir
|
||||
mail_location = maildir:/var/mail/vhosts/%{domain}/%{username}/Maildir
|
||||
mail_privileged_group = vmail
|
||||
|
||||
auth_mechanisms = plain login
|
||||
auth_allow_cleartext = yes
|
||||
|
||||
passdb {
|
||||
driver = passwd-file
|
||||
args = scheme=SHA512-CRYPT /etc/dovecot/users
|
||||
passdb passwd-file {
|
||||
default_password_scheme = SHA512-CRYPT
|
||||
passwd_file_path = /etc/dovecot/users
|
||||
}
|
||||
|
||||
userdb {
|
||||
driver = static
|
||||
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
|
||||
userdb static {
|
||||
fields {
|
||||
uid = vmail
|
||||
gid = vmail
|
||||
home = /var/mail/vhosts/%{domain}/%{username}
|
||||
}
|
||||
}
|
||||
|
||||
service imap-login {
|
||||
|
||||
@@ -75,45 +75,45 @@ anvil unix - - y - 1 anvil
|
||||
scache unix - - y - 1 scache
|
||||
MASTER
|
||||
|
||||
# --- Dovecot ---
|
||||
cat > /etc/dovecot/conf.d/10-mail.conf << DOVECOT
|
||||
mail_location = maildir:/var/mail/vhosts/%d/%n/Maildir
|
||||
# --- Dovecot 2.4 (format unifié) ---
|
||||
cat > /etc/dovecot/dovecot.conf << DOVECOT
|
||||
dovecot_config_version = 2.4.0
|
||||
dovecot_storage_version = 2.4.0
|
||||
|
||||
protocols = imap
|
||||
listen = *
|
||||
|
||||
mail_location = maildir:/var/mail/vhosts/%{domain}/%{username}/Maildir
|
||||
mail_privileged_group = vmail
|
||||
DOVECOT
|
||||
|
||||
cat > /etc/dovecot/conf.d/10-auth.conf << DOVECOTAUTH
|
||||
auth_mechanisms = plain login
|
||||
!include auth-passwdfile.conf.ext
|
||||
DOVECOTAUTH
|
||||
auth_allow_cleartext = yes
|
||||
|
||||
cat > /etc/dovecot/conf.d/auth-passwdfile.conf.ext << PASSFILE
|
||||
passdb {
|
||||
driver = passwd-file
|
||||
args = scheme=SHA512-CRYPT /etc/dovecot/users
|
||||
passdb passwd-file {
|
||||
default_password_scheme = SHA512-CRYPT
|
||||
passwd_file_path = /etc/dovecot/users
|
||||
}
|
||||
|
||||
userdb static {
|
||||
fields {
|
||||
uid = vmail
|
||||
gid = vmail
|
||||
home = /var/mail/vhosts/%{domain}/%{username}
|
||||
}
|
||||
}
|
||||
userdb {
|
||||
driver = static
|
||||
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
|
||||
}
|
||||
PASSFILE
|
||||
|
||||
cat > /etc/dovecot/conf.d/10-master.conf << DOVMASTER
|
||||
service imap-login {
|
||||
inet_listener imap {
|
||||
port = ${IMAP_PORT}
|
||||
}
|
||||
inet_listener imaps {
|
||||
port = ${IMAPS_PORT}
|
||||
ssl = yes
|
||||
}
|
||||
}
|
||||
service auth {
|
||||
unix_listener auth-userdb {
|
||||
mode = 0600
|
||||
user = vmail
|
||||
}
|
||||
}
|
||||
DOVMASTER
|
||||
|
||||
log_path = /var/log/dovecot.log
|
||||
info_log_path = /var/log/dovecot-info.log
|
||||
DOVECOT
|
||||
|
||||
# --- Samba workgroup ---
|
||||
sed -i "s/^\s*workgroup\s*=.*/ workgroup = ${WORKGROUP}/" /etc/samba/smb.conf
|
||||
|
||||
Reference in New Issue
Block a user