mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #175 from YunoHost/dovecot_extensible_configuration
[enh] Dovecot extensible configuration
This commit is contained in:
commit
92ec847496
4 changed files with 50 additions and 36 deletions
|
@ -26,11 +26,18 @@ do_pre_regen() {
|
|||
's/^\(listen =\).*/\1 */' \
|
||||
"${dovecot_dir}/dovecot.conf"
|
||||
fi
|
||||
|
||||
mkdir -p "${dovecot_dir}/yunohost.d"
|
||||
cp pre-ext.conf "${dovecot_dir}/yunohost.d"
|
||||
cp post-ext.conf "${dovecot_dir}/yunohost.d"
|
||||
}
|
||||
|
||||
do_post_regen() {
|
||||
regen_conf_files=$1
|
||||
|
||||
sudo mkdir -p "/etc/dovecot/yunohost.d/pre-ext.d"
|
||||
sudo mkdir -p "/etc/dovecot/yunohost.d/post-ext.d"
|
||||
|
||||
# create vmail user
|
||||
id vmail > /dev/null 2>&1 \
|
||||
|| sudo adduser --system --ingroup mail --uid 500 vmail
|
||||
|
|
|
@ -1,18 +1,48 @@
|
|||
# 2.1.7: /etc/dovecot/dovecot.conf
|
||||
# OS: Linux 3.2.0-3-686-pae i686 Debian wheezy/sid ext4
|
||||
!include yunohost.d/pre-ext.conf
|
||||
|
||||
listen = *, ::
|
||||
auth_mechanisms = plain login
|
||||
login_greeting = Dovecot ready!!
|
||||
|
||||
mail_gid = 8
|
||||
mail_home = /var/mail/%n
|
||||
mail_location = maildir:/var/mail/%n
|
||||
mail_uid = 500
|
||||
|
||||
protocols = imap sieve
|
||||
|
||||
mail_plugins = $mail_plugins quota
|
||||
|
||||
|
||||
ssl = yes
|
||||
ssl_cert = </etc/yunohost/certs/{{ main_domain }}/crt.pem
|
||||
ssl_key = </etc/yunohost/certs/{{ main_domain }}/key.pem
|
||||
ssl_protocols = !SSLv2 !SSLv3
|
||||
|
||||
passdb {
|
||||
args = /etc/dovecot/dovecot-ldap.conf
|
||||
driver = ldap
|
||||
}
|
||||
protocols = imap sieve
|
||||
mail_plugins = $mail_plugins quota
|
||||
|
||||
userdb {
|
||||
args = /etc/dovecot/dovecot-ldap.conf
|
||||
driver = ldap
|
||||
}
|
||||
|
||||
protocol imap {
|
||||
imap_client_workarounds =
|
||||
mail_plugins = $mail_plugins imap_quota antispam
|
||||
}
|
||||
|
||||
|
||||
protocol lda {
|
||||
auth_socket_path = /var/run/dovecot/auth-master
|
||||
mail_plugins = quota sieve
|
||||
postmaster_address = postmaster@{{ main_domain }}
|
||||
}
|
||||
|
||||
protocol sieve {
|
||||
}
|
||||
|
||||
service auth {
|
||||
unix_listener /var/spool/postfix/private/auth {
|
||||
group = postfix
|
||||
|
@ -26,26 +56,11 @@ service auth {
|
|||
}
|
||||
}
|
||||
|
||||
protocol sieve {
|
||||
}
|
||||
|
||||
ssl = yes
|
||||
ssl_cert = </etc/yunohost/certs/{{ main_domain }}/crt.pem
|
||||
ssl_key = </etc/yunohost/certs/{{ main_domain }}/key.pem
|
||||
ssl_protocols = !SSLv2 !SSLv3
|
||||
|
||||
userdb {
|
||||
args = /etc/dovecot/dovecot-ldap.conf
|
||||
driver = ldap
|
||||
}
|
||||
protocol imap {
|
||||
imap_client_workarounds =
|
||||
mail_plugins = $mail_plugins imap_quota antispam
|
||||
}
|
||||
protocol lda {
|
||||
auth_socket_path = /var/run/dovecot/auth-master
|
||||
mail_plugins = quota sieve
|
||||
postmaster_address = postmaster@{{ main_domain }}
|
||||
service quota-warning {
|
||||
executable = script /usr/bin/quota-warning.sh
|
||||
user = vmail
|
||||
unix_listener quota-warning {
|
||||
}
|
||||
}
|
||||
|
||||
plugin {
|
||||
|
@ -66,11 +81,6 @@ plugin {
|
|||
antispam_pipe_program_notspam_arg = learn_ham
|
||||
}
|
||||
|
||||
plugin {
|
||||
autosubscribe = Trash
|
||||
autosubscribe2 = Junk
|
||||
}
|
||||
|
||||
plugin {
|
||||
quota = maildir:User quota
|
||||
quota_rule2 = SPAM:ignore
|
||||
|
@ -83,9 +93,4 @@ plugin {
|
|||
quota_warning3 = -storage=100%% quota-warning below %u # user is no longer over quota
|
||||
}
|
||||
|
||||
service quota-warning {
|
||||
executable = script /usr/bin/quota-warning.sh
|
||||
user = vmail
|
||||
unix_listener quota-warning {
|
||||
}
|
||||
}
|
||||
!include yunohost.d/post-ext.conf
|
||||
|
|
1
data/templates/dovecot/post-ext.conf
Normal file
1
data/templates/dovecot/post-ext.conf
Normal file
|
@ -0,0 +1 @@
|
|||
!include_try post-ext.d/*.conf
|
1
data/templates/dovecot/pre-ext.conf
Normal file
1
data/templates/dovecot/pre-ext.conf
Normal file
|
@ -0,0 +1 @@
|
|||
!include_try pre-ext.d/*.conf
|
Loading…
Add table
Reference in a new issue