Skip to content

Instantly share code, notes, and snippets.

@daryltucker
Created April 1, 2019 18:16
Show Gist options
  • Save daryltucker/081080419e7a9539651198169302beb4 to your computer and use it in GitHub Desktop.
Save daryltucker/081080419e7a9539651198169302beb4 to your computer and use it in GitHub Desktop.
Increase available ulimit for dovecot and enable in systemd
Warning: fd limit (ulimit -n) is lower than required under max. load (1024 < 6000), because of service auth { client_limit }

# vim /etc/dovecot/conf.d/10-master.conf

...
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0660
    user = postfix
    group = postfix
  }
  client_limit = 6000
}
...

# vim /etc/security/limits.conf

...
# Use 'postfix' if not in vmail group
@vmail          soft    nofile  7000
@vmail          hard    nofile  9000
...

# vim /lib/systemd/system/dovecot.service

...
[Service]
TasksMax=6000
LimitNOFILE=6000
...
# systemctl daemon-reload
# systemctl restart dovecot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment