Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member bmcpanel's Avatar
    Join Date
    Jun 2002
    Posts
    546

    Default How Do I.. Delete exim queue via ssh?

    Hi. Due to spamming, spoofing from fields, etc., etc., etc., I am finding it necessary to spend more time to clear the exim queue from time to time. I went about 5 days last week without cleaning the queue, and there were over 9,000 messages in the queue (all undeliverable mail so exim kept them in the queue to retry them over and over again... zzzzz)

    Anyway, after that I set all accounts to :fail: , but now, I still need to clean the queue on a regular basis due to filthy spammers.

    Thus, my question is, instead of doing this from within WHM, I would like to run a cron tab to do this. While in SSH, what command would I use to delete the queue just like is performed in WHM?

    Thanks.

  2. #2
    Member
    Join Date
    Feb 2005
    Posts
    312

    Default exim cheatsheet

    http://bradthemad.org/tech/notes/exim_cheatsheet.php


    I have the following script to clear out boxtrapper messages which are stuck in the exim queue:

    you can modify it as needed to solve your problem:
    #!/bin/sh
    exim -Mrm `grep -lr 'To complete this verification, simply reply' /var/spool/exi
    m/input/ | sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g'` 2> /dev/null

  3. #3
    Registered User
    Join Date
    Mar 2006
    Posts
    3

    Default

    Quote Originally Posted by bmcpanel
    Hi. Due to spamming, spoofing from fields, etc., etc., etc., I am finding it necessary to spend more time to clear the exim queue from time to time. I went about 5 days last week without cleaning the queue, and there were over 9,000 messages in the queue (all undeliverable mail so exim kept them in the queue to retry them over and over again... zzzzz)

    Anyway, after that I set all accounts to :fail: , but now, I still need to clean the queue on a regular basis due to filthy spammers.

    Thus, my question is, instead of doing this from within WHM, I would like to run a cron tab to do this. While in SSH, what command would I use to delete the queue just like is performed in WHM?

    Thanks.

    exim -bp | grep \< | awk '{print $3}' | xargs exim -Mrm

  4. #4
    Member
    Join Date
    Jan 2005
    Location
    London, UK
    Posts
    187

    Default

    Quote Originally Posted by jesmarcelo
    exim -bp | grep \< | awk '{print $3}' | xargs exim -Mrm
    I run the following, slightly different:

    PHP Code:
    exim -bpru|grep frozen|awk {'print $3'}|xargs exim -Mrm 
    - Vince

  5. #5
    Member bmcpanel's Avatar
    Join Date
    Jun 2002
    Posts
    546

    Default

    Thanks guys. The examples work just fine. I have a cron job setup and this will help me automate one of the boring server tasks for me. Thanks again!
    Last edited by bmcpanel; 07-06-2006 at 08:07 PM.

  6. #6
    Member
    Join Date
    Jan 2006
    Posts
    50

    Default

    Quote Originally Posted by mambovince
    I run the following, slightly different:

    PHP Code:
    exim -bpru|grep frozen|awk {'print $3'}|xargs exim -Mrm 
    - Vince
    Alternatively use exiqgrep:

    PHP Code:
    exiqgrep -zi xargs exim -Mrm 
    This is also good for removing failed delivery messages to (likely) non-existent senders:
    PHP Code:
    exiqgrep --'<>'  xargs exim -Mrm 

Similar Threads & Tags
Similar threads

  1. Replies: 2
    Last Post: 08-15-2007, 06:00 AM
  2. queue delete.
    By its_joe in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-29-2007, 03:24 AM
  3. How to delete the exim mail queue from the command line
    By AHATEMA in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-09-2007, 06:40 AM
  4. Selectively delete from Exim queue
    By Zaf in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-06-2005, 04:14 PM
  5. Exim queue, lot of mails, queue not deliver
    By cass in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-21-2004, 07:35 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube