Mails struck in qmail todo queue in an Interworx server

Mails were getting struck in qmail mail todo box. Tried to process the mails but was not successful. This can happen permissions, timestamps, or other file attributes of the queue have been modified by something other than qmail programs and you are having issues sending/recieving mail. Additionally, if you are sitting on a large (1000+) set of spam messages in the remote queue this can stop that mail from being sent out.

To reset the queue you can do following steps:

1. cd /var/qmail – Change to the directory where the qmail queue exists.
2. service smtp stop – Stop the qmail-smtp service.
3. mv queue queue.bad – Move the damaged queue into a folder for later analysis or message recovery.
4. yum reinstall qmail – Reinstall qmail, which automatically sets up a new queue with the appropriate parameters. This command does not change any of your qmail settings.
5.service smtp start – Restart the qmail-smtp service.

After that you can see that the new mails will start getting send or received without any issues.

Note: This will affect the existing mails as we have removed the queue.

Leave a comment