we caboodle News

Clear Plesk Mail Queue

News Categories: Server Help

This article was published on: 05/10/16 3:48 AM

Clear Plesk Mail Queue via SSH Qmail or Roundcube

First lets check the number of messages from the queue using the qmail-qstat tool:

[root@yourserver /]# /var/qmail/bin/qmail-qstat
messages in queue: 52
messages in queue but not yet preprocessed: 2

We ALWAYS stop the mail server before making any changes or running clean up tools, to avoid having to reconfigure it again:

service qmail stop

Once the mail server service is stopped we are going to execute the following commands one by one:

find /var/qmail/queue/mess -type f -exec rm {} \;
find /var/qmail/queue/info -type f -exec rm {} \;
find /var/qmail/queue/local -type f -exec rm {} \;
find /var/qmail/queue/intd -type f -exec rm {} \;
find /var/qmail/queue/todo -type f -exec rm {} \;
find /var/qmail/queue/remote -type f -exec rm {} \;

Finally start the mail service and recheck the queue to ensure that all the messages have been removed:

service qmail start

To automate this process I have two scripts available (basically, are performing the same operations as above). For those that receive oversized file truncating errors please use the 2nd script – it takes a little longer but gets the job done.

wget https://dragos.fedorovici.com/qmailclear.sh
wget https://dragos.fedorovici.com/qmailclean.sh
sh qmailclean.sh
sh qmailclear.sh

we caboodle - full service agency team

Ready to Start?

we are driven by the challenge of building a bespoke website for your business, improve SEO performance, fix UX/UI issues and streamline your branding across all social & paid channels.

Are you looking for a new, full service agency? contact us today for a free quotation or advice, and lets build something great, together!





    William Holt

    Meet Will

    I've been designing & developing websites for over 2 decades. my first project was built on Microsoft Frontpage, yes I go that far back!

    Speak to me direct regarding your next project or the benefits of switching your digital agency to Web Caboodle

    will@wecaboodle.com | 07368 229004 | LinkedIn Profile

    Web Design Manchester

    Studio 13
    Woolden Road

    Web Design London

    71-75 Shelton Street
    Covent Garden

    let's connect


    Copyright 2023 Web Caboodle - Web Design and Development Agency | We Website Design Ltd 13127888 Registered in England and Wales | Privacy Policy