This document describes the usage of the hidden CLI command repairqueue on the Cisco Email Security Appliance (ESA) and how to validate queue recovery.
Reasons to run the repairqueue command:
Status or Status Detail reports an Oldest Message value that exceeds the configured bounce profile threshold.
Note: This check excludes virtual delivery domain queues such as the ..queue (for example, the.cpq.queue and the.euq.queue) and the.cpq.release.host).
Reasons to not run the repairqueue command:
The information in this document is based on these software and hardware versions:
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. In live networks, confirm the potential impact of each command before proceeding.
Cisco recommends knowledge of these topics:
The CLI command repairqueue does not repair all workqueue issues or corruption. The utility attempts a best-effort repair of the workqueue.
Run repairqueue. The first process runs prompts for permission once to proceed and execute the repair:
esa.example.com> repairqueue
Do you want to repair or clean the queue?
1. Repair.
2. Clean.
[1]> 1
The mail flow will be stopped throughout the repair/cleanup process
WARNING:
This utility does a best effort to repair the queue.
Not all queues corruptions can be repaired.
Are you sure you want to proceed? [N]> y
Checking generation checksum files
...
<<<SNIP FOR BREVITY>>>
...
done
Repair succeeded
Starting Hermes
Hermes Started
Log into the system and verify the status of the system. Once the repair process completes and the workqueue is repaired, the appliance retains an old checkpoint of the previous workqueue. To resume writing a new checkpoint for workqueue processing, run repairqueue again, and enter the command to Clean:
esa.example.com> repairqueue
Do you want to repair or clean the queue?
1. Repair.
2. Clean.
[1]> 2
The mail flow will be stopped throughout the repair/cleanup process
WARNING:
There is a backup found this may be the only backup.
This will remove the old queue.
Are you sure you want to proceed? [N]> y
Double confirmation. Are you sure you want to proceed? [N]> y
Removing old queue
Cleanup finished Common causes of workqueue corruption include:
Unexpected reboots or improper shutdowns (for example, power interruptions). Depending on what backend processes are running at the time, the queue can become corrupt or fail to mount after reboot. In this case, the CLI can report errors such as:
esa.example.com> status
Enter "status detail" for more information.
Couldn't obtain mail stats - my.esa: The daemon is not responding. esa.example.com> status
Enter "status detail" for more information.
Couldn't obtain mail stats - the queue is not mounted Users who have appliances running older versions of AsyncOS that do not have the repairqueue hidden CLI command option can open a support case in order to have a Cisco Support engineer assist with the procedure. A support tunnel needs to be opened and available for Cisco Support to access the appliance and run the repairqueue command. Contact Cisco Support to open an active support case.
In most cases, corruption does not equal mail loss. The queue is corrupt due to meta-data related to message processing that is no longer on the appliance. This is record-keeping for processing between the queue, reporting, and message tracking. Running repairqueue rebuilds the ESA meta-data and cleans up any misreporting between the services and processing.
The ESA can run for a long time on a corrupted queue, and most messages still process. However, the appliance can appear sluggish, or some messages can never clear, as indicated by the Oldest Message value in the status command (significantly older than the bounceconfig threshold). When AsyncOS restarts with a corrupted queue, the queue can fail to mount. The corruption can occur earlier and remain unnoticed until the appliance restarts, at which point the queue fails to mount.
Repairing the workqueue can take anywhere from 10 seconds to several hours, depending on the state of the ESA and how many messages are currently processing through an active workqueue. A workqueue repair on lower-end appliance with full queues at the time of corruption could take several hours.
In certain situations, (for example, an over-full queue on an appliance) the repairqueue is not able to complete. if repairqueue does not complete after 4 hours, the queue is most likely unrepairable and the only recourse is to build a new queue. For such advanced issues, Contact Cisco Support to open an active support case and have Cisco Support assist.
| Revision | Publish Date | Comments |
|---|---|---|
2.0 |
02-Oct-2026
|
Recertification |
1.0 |
10-Aug-2017
|
Initial Release |