Applicable to:
- Plesk for Linux
Symptoms
-
Emails from a Plesk server can not be sent using a mail client, for example, Outlook:
CONFIG_TEXT: Your IMAP server wants to alert you to the following: Inotify initialization error
-
Courier IMAP server is used for IMAP/POP3 delivery.
-
In the
/var/log/maillog
log file the following errors can be found:CONFIG_TEXT: plesk courier-imaps: Failed to create cache file: maildirwatch (jdoe@example.com)
plesk courier-imaps: Error: Too many open files
Cause
Insufficient value for per-userid limit of inotify file descriptors.
Resolution
-
Connect to the server via SSH.
-
Check the current per-userid limit of inotify file descriptors:
# cat /proc/sys/fs/inotify/max_user_instances
128 -
Increase this value to a greater one via the command below, for example to 200:
# echo "fs.inotify.max_user_instances=200" >> /etc/sysctl.conf
Note: Rough metric is the number of concurrent IMAP sessions multiplied by 4.
-
Apply changes by executing the command:
# sysctl -p
-
Restart Courier-Imap services:
# systemctl restart courier*
Comments
2 comments
Hi Anastasia Zyrianova,
Thank you for this post.
We did increase the inotify value up to 300 but the warning is still showing up on Outlook clients.
A customer email address is only used on one computer so very few connections.
What do you recommend in this case?
Thank you in advance and wish you have a good day.
Hello Quentin Di Meo,
Check the current per-userid limit of inotify file descriptors using the command below, and adjust the `fs.inotify.max_user_instances` value accordingly:
# cat /proc/sys/fs/inotify/max_user_instances
In case the issue still persists after that, check /var/log/maillog log file for details.
Please sign in to leave a comment.