Email & webmail

Configure the cPanel mail server (Dovecot) in WHM (root guide)

Tune Dovecot in WHM Mailserver Configuration as root: IMAP/POP3 protocols, connections per IP, TLS settings and mailbox options, and fix "too many connections" errors.

AdvancedWHM (root)2 min read

cPanel uses Dovecot to let users read mail over IMAP and POP3. Its settings in WHM decide how many connections each user and IP may open, which protocols and TLS versions are allowed, and how mailboxes are stored. Sensible values prevent both overload and annoying client errors.

MdmHost manages mail server settings on its hosting plans. This guide is for administrators of their own cPanel server with root access.

Before you start

Open Mailserver Configuration

Go to WHM → Service Configuration → Mailserver Configuration.

Key settings

SettingSuggestedWhy
Protocols EnabledIMAP and POP3Disable POP3 only if no customers use it
Maximum IMAP Connections Per IP Address20–40Offices with many devices behind one IP need more
Allow Plaintext AuthenticationNoForces TLS so passwords are never sent in clear
SSL/TLS protocolsTLS 1.2 and 1.3Older protocols are insecure
Mailbox formatmdbox (default on new servers)Efficient for large mailboxes
Login process limitsDefaults; raise on very busy serversToo low causes slow logins at peak

Note: Changing the mailbox format for existing accounts requires a conversion in WHM (Mailbox Conversion). Do it per account in a quiet period.

Save and verify

  1. Click Save; WHM restarts Dovecot.
  2. Test login with a mail client using IMAP port 993 and SSL.

"Too many connections" errors

Users with phones, tablets and laptops, all on one office IP, can exceed the per-IP limit. Symptoms: some devices cannot fetch mail, others can. Raise Maximum IMAP Connections Per IP Address modestly, and suggest clients limit cached connections (for example in Thunderbird's account settings).

Security

Troubleshooting

Clients warn about certificates

Users connect with a hostname that is not on the certificate. Tell them to use the server hostname or mail.theirdomain.com with AutoSSL active.

Dovecot does not start after changes

Check /var/log/maillog for the error, revert the last change and restart with /usr/local/cpanel/scripts/restartsrv_dovecot.

Frequently asked questions

Should I disable POP3?

Only if no customers rely on it. Most users are better off with IMAP, which syncs across devices.

Where are mailbox quotas set?

Per mailbox in cPanel, and the maximum per mailbox in the hosting package.

Does this affect webmail?

Roundcube connects to Dovecot locally, so login and TLS settings apply; per-IP limits rarely matter for webmail.

How do I see current IMAP connections?

Run doveadm who as root to list logged-in users and their connection counts.

What causes slow IMAP on big mailboxes?

Very large folders and old mailbox formats. Encourage archiving and consider converting to mdbox.

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.