邮件服务器页面登录失败,修改postfix和dovecot参数,imap进程数超过100登录失败
前情说明:
最近部署了一套邮件服务器并带有 网页访问的WebMail,在登陆过程中经常会遇到登陆失败的情况
解决思路:
经过对系统的检查,发现其服务器的资源使用情况以及网络都正常,其中发现邮件通过imap连接,当imap的进程数超过100的情况下,界面登陆失败的可能性非常大,然后重启dovecot服务,就可以登陆,其imap的连接进程数也降低100以下;
查找到dovecot.log下有告警提示,日志路径查看配置文件/etc/dovecot/dovecot.conf ,这里配置的路径为log_path = /var/log/dovecot.log;
master: Warning: service(imap-login): process_limit (100) reached, client connections are being dropped master: Warning: service(imap-login): process_limit (100) reached, client connections are being dropped master: Warning: service(imap-login): process_limit (100) reached, client connections are being dropped |
所以通过检查,其修改dovecot进程数量:
1、dovecot -a查看其参数;
使用命令vim /etc/dovecot/dovecot.conf 修改dovecot进程数量:
在service imap-login 下添加(如果存在则修改) process_limit = 500,根据需要调整期参数大小
service imap-login { inet_listener imap { #port=0 port = 143 } inet_listener imaps { #port = 993 #ssl = yes } process_limit = 500 } |
在service imap下添加(如果存在则修改)process_limit = 204800
service imap { # Most of the memory goes to mmap()ing files. You may need to increase this # limit if you have huge mailboxes. #vsz_limit = $default_vsz_limit # Max. number of IMAP processes (connections) #process_limit = 1024 process_limit = 204800 } |
在service pop3下添加(如果存在则修改)process_limit = 204800
service pop3 { # Max. number of POP3 processes (connections) #process_limit = 1024 process_limit = 204800 } |
在protocol imap下添加(如果存在则修改)mail_max_userip_connections = 20480
protocol imap { # Space separated list of plugins to load (default is global mail_plugins). #mail_plugins = $mail_plugins mail_plugins = quota imap_quota imap_client_workarounds = tb-extra-mailbox-sep mail_max_userip_connections = 20480 } |
重启dovecot命令:
service dovecot restart
2、在/etc/postfix/main.cf查看是否有default_process_limit参数,如果没有则添加,有则修改default_process_limit = 500
重启postfix命令:service postfix restart
然后再跟踪webmail登录时的错误提示是否还会出现。