Home Web Hosting Applications Engineering Support About Us Contact Info

Maintaining your Mail Queue

When you attempt to send E-Mail from your Virtual Private Server to an E-Mail address at a server that is down or temporarily unreachable, the E-Mail is queued on your server for future delivery. By default, your E-Mail server will try to deliver queued up mail every 8 hours. After 3 days if the message is still undeliverable, it will be returned to the sender.

There may be times that you want or need to flush your mail queue by hand. For example, one of your users may send out E-Mail to a large list of addresses many of which are undeliverable, a spammer may use your server to relay E-Mail that may contain many invalid addresses, or the process to automatically flush your mail queue may not be working properly. The E-Mail that queues up on your server consumes your valuable disk space quota and affects the performance of your sendmail program. The directions below will help you properly maintain your mail queue.

Your Virtual Private Server's mail queue is located in the ~/var/spool/mqueue directory. Each E-Mail in the queue is normally stored in 2 separate files. The header of each E-Mail is stored in a file with a name that starts with a "q". The rest of the file name indicates when the message was received. The body of the same E-mail is stored in a file with a name beginning with a "d". The rest of the file name matches that of the header.

You can check the contents of your mail queue by typing this command at your Virtual Private Server command prompt:

% virtual sendmail -bp

You can check the amount of your disk space quota that e-mail in your mail queue is consuming by typing this command at the prompt:

% vdiskuse | grep mqueue

You can flush your mail queue by typing this command:

% virtual sendmail -q -v

The "-q" flag flushes the queue. The "-v" flag prints the output to the screen so you can see what is happening.