Skip to content

Scheduling cPanel updates without breaking customer mail flow

cPanel auto-updates can drop mail for minutes at a time. Here is how we schedule the upgrade window so customer SMTP and IMAP stay reachable through it.

A cPanel update kicks off at 02:00 server time, Exim restarts as part of the run, Dovecot rebuilds its config, and the next morning a customer reports that their POS terminal couldn’t send order confirmations for forty minutes overnight. Nothing was technically broken — the update just didn’t respect that the box is also a production mail host.

What’s happening

upcp does more than upgrade the WHM stack. It touches Exim, Dovecot, MailScanner config, and the cPanel-managed /etc/exim.conf.local overlay. When the run hits the mail subsystem, Exim is stopped, reconfigured, and restarted. Dovecot follows. Both daemons are unavailable for the duration of the restart — usually seconds, occasionally longer if a config rebuild triggers a full reindex.

The default cron-driven upcp window honors the UPDATES tier setting (release, stable, current) but not your business hours. On a server hosting transactional mail, the default window is wrong.

How to verify

Confirm what the server is currently configured to do:

grep -E '^(UPDATES|CPANEL|RPMUP|SARULESUP)' /var/cpanel/cpanel.config
cat /etc/cron.d/cpanel_check

Then check when the last upcp actually ran and how long the mail daemons were down:

ls -lt /var/cpanel/updatelogs/ | head -5
grep -E 'exim|dovecot' /var/cpanel/updatelogs/upcp.lock.<timestamp>.log

Cross-reference against the mail log for the same window:

awk -v start='2026-05-10 02:00' -v end='2026-05-10 02:30' \
  '$1" "$2 >= start && $1" "$2 <= end' /var/log/exim_mainlog | grep -c 'rejected\|deferred'

Any deferral spike inside the upgrade window is a customer-visible mail outage you didn’t bill them for.

The fix

Move the update to a window you control, not the cPanel default. In WHM under Update Preferences, set Daily Updates to Manual. Schedule upcp via your own cron entry at a true low-traffic time for that customer base — for many Canadian-hosted SMB workloads that’s Sunday 04:00 ET, not the cPanel-shipped 02:00. Before each run, queue-flush Exim so in-flight mail isn’t sitting in the spool when the restart hits:

exim -qff && /scripts/upcp --sync

After the upgrade, confirm Exim and Dovecot both came back cleanly (systemctl status exim dovecot) and that /var/log/exim_mainlog shows new accepted deliveries within two minutes of the restart.


Stack Harbor schedules cPanel update windows per customer as part of our deployment management practice and watches mail flow through the window with monitoring and support. For a managed patch window on a production mail server, contact our team.