- Change default process/client limits.
- Configure /var/vmail/tmp as temp directory (systemd service has PrivateTmpDir=true and so /tmp isn't usable).
This commit is contained in:
parent
1c4555e410
commit
80d98c0363
@ -910,8 +910,8 @@ fi
|
||||
|
||||
## - edit /usr/local/dovecot/etc/dovecot/conf.d/10-master.conf
|
||||
## -
|
||||
## - default_process_limit = 200
|
||||
## - default_client_limit = 2000
|
||||
## - default_process_limit = 1024
|
||||
## - default_client_limit = 10240
|
||||
## -
|
||||
## - default_vsz_limit = 512M
|
||||
## -
|
||||
@ -1009,9 +1009,9 @@ fi
|
||||
|
||||
## - setting default prozcess/client limit
|
||||
## -
|
||||
perl -i -n -p -e "s#^([ ]*\#?[ ]*)(default_process_limit.*)#\1\2\ndefault_process_limit = 200#g" \
|
||||
perl -i -n -p -e "s#^([ ]*\#?[ ]*)(default_process_limit.*)#\1\2\ndefault_process_limit = 1024#g" \
|
||||
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-master.conf || _failed=true
|
||||
perl -i -n -p -e "s#^([ ]*\#?[ ]*)(default_client_limit.*)#\1\2\ndefault_client_limit = 2000#g" \
|
||||
perl -i -n -p -e "s#^([ ]*\#?[ ]*)(default_client_limit.*)#\1\2\ndefault_client_limit = 10240#g" \
|
||||
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-master.conf || _failed=true
|
||||
|
||||
perl -i -n -p -e "s#^([ ]*\#?[ ]*)(default_vsz_limit.*)#\1\2\ndefault_vsz_limit = 512M#g" \
|
||||
@ -1085,6 +1085,8 @@ fi
|
||||
## - first_valid_uid = 5000
|
||||
## - last_valid_uid = 5000
|
||||
## -
|
||||
## - mail_temp_dir = /var/vmail/tmp
|
||||
## -
|
||||
## - first_valid_gid = 5000
|
||||
## - last_valid_gid = 5000
|
||||
## -
|
||||
@ -1099,6 +1101,8 @@ perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_uid.*)#\1\#\# \2\n\1mail_uid = vmail#g" \
|
||||
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true
|
||||
perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_gid.*)#\1\#\# \2\n\1mail_gid = vmail#g" \
|
||||
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true
|
||||
perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_temp_dir.*)#\1\#\# \2\n\1mail_temp_dir = mail_temp_dir#g" \
|
||||
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true
|
||||
perl -i -n -p -e "s#^([ ]*)\#?\ ?(first_valid_uid.*)#\1\#\# \2\n\1first_valid_uid = 5000#g" \
|
||||
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true
|
||||
perl -i -n -p -e "s#^([ ]*)\#?\ ?(last_valid_uid.*)#\1\#\# \2\n\1last_valid_uid = 5000#g" \
|
||||
@ -1113,6 +1117,28 @@ perl -i -n -p -e "s#^([ ]*)\#?\ ?(mail_plugins\ +=.*)#\1\#\# \2\n\1mail_plugins
|
||||
/usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true
|
||||
|
||||
|
||||
echononl "\tCreate TEMP directory '/var/vmail/tmp' .."
|
||||
if [[ ! -d /var/vmail/tmp ]] ; then
|
||||
mkdir /var/vmail/tmp > /dev/null 2>&1
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo -e "$rc_done"
|
||||
else
|
||||
echo -e "$rc_failed"
|
||||
error "Creating TEMP directory '/var/vmail/tmp' failed."
|
||||
fi
|
||||
else
|
||||
echo -e "$rc_skipped"
|
||||
fi
|
||||
|
||||
echononl "\tChange ownerchip of directory '/var/vmail/tmp' .."
|
||||
chown vmail:vmail /var/vmail/tmp > /dev/null 2>&1
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo -e "$rc_done"
|
||||
else
|
||||
echo -e "$rc_failed"
|
||||
error "Changing ownerchip of directory '/var/vmail/tmp' failed."
|
||||
fi
|
||||
|
||||
## - edit /usr/local/dovecot/etc/dovecot/conf.d/10-mail.conf
|
||||
## -
|
||||
## - comment out namespace section "namespace inbox". we will create namespaces later.
|
||||
@ -3281,18 +3307,19 @@ if [ "y" = "$_restart" -o "Y" = "$_restart" -o "Yes" = "$_restart" -o "yes" = "$
|
||||
fi
|
||||
|
||||
|
||||
echo "
|
||||
echo -e "
|
||||
|
||||
Notice:
|
||||
If you want to support more than 128 simultanously connections (the default),
|
||||
you have to increase \"/proc/sys/fs/inotify/max_user_instances\".
|
||||
\033[33m\033[1mNotice:\033[m
|
||||
The Dovecot Service is configured to support more than 128 simultanously connections.
|
||||
|
||||
If you are running dovecot on a VServer Guest System, you have to do that on the
|
||||
VServer Root System:
|
||||
So, you have to \033[1mincrease /proc/sys/fs/inotify/max_user_instances\033[m (default is 128):
|
||||
|
||||
# echo \"fs.inotify.max_user_instances = 1024\" >> /etc/sysctl.conf
|
||||
# echo \"fs.inotify.max_user_instances = 2048\" >> /etc/sysctl.conf
|
||||
# sysctl -p
|
||||
|
||||
If you are running dovecot on a Virtual Guest System, you have to do that on the
|
||||
Host (Root) System.
|
||||
|
||||
"
|
||||
echo ""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user