This post will show you how to deal with the persistent "Exim - Mail Server Upgrade In Progress. Message Queued" Error.

One of the many cPanel servers I manage went down the other day. It was regrettably an older server, running some rediculously dated version of CentOS and cPanel/WHM.

It was also using the mbox Mailbox format.

I needed to restore all of my customers' accounts to the machine, and during the restore all of the mboxes needed to be converted to maildir format. Thankfully cpanel has a script to make this as painless as possible -

/usr/local/cpanel/bin/convertmaildir

I launched the convertmaildir script, and let it run for a couple of hours with no incident. The problem was that a few customer directories were mounted over NFS, and the link went stale, causing the system to stall/block while waiting for the NFS link.

Long story short, I had to reboot. When it came back up, there was a persistent message in /var/log/exim_mainlog:

" Mail Server Upgrade In Progress. Message Queued". I tried a number of different things, and finally went into the perl source code of convertmaildir.

/usr/local/cpanel/bin/convertmaildir calls /usr/local/cpanel/bin/maildirupdate
/usr/local/cpanel/bin/maildirupdate has a subroutine named 'freezeexim()' and 'unfreezeexim()'

After examining them, I see that they create an obscure include file called
"/usr/local/cpanel/etc/exim/cf/fail_remote_domains"
with the following content:

temp_defer:
  driver = redirect
  allow_defer
  data = :defer: Mail Server Upgrade in Progress. Message Queued
  verify = false

It then runs /scripts/buildeximconf, which includes everything found in the /usr/local/cpanel/etc/exim/cf/ folder by default.

SOLUTION:

rm /usr/local/cpanel/etc/exim/cf/fail_remote_domains
/scripts/buildeximconf
/scripts/restartsrv_exim