Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How can i delete part of domain's mail in the Mail Queue ? not delete all !

Discussion in 'E-mail Discussion' started by hkewell, Aug 15, 2007.

  1. hkewell

    hkewell Well-Known Member

    Joined:
    May 17, 2002
    Messages:
    170
    Likes Received:
    0
    Trophy Points:
    316
    I want to delete part of mail in queue which more than one thousand. But i don't want to delete all.

    any idea ?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Planet Earth
    -Delete all emails of "from@domain.com" from the mailserver queue:

    exim -bp | grep from@domain.com | awk '{ print $3 }' | grep -v "^$" | xargs exim -Mrm

    -Delete all emails of "to@domain.com" from the mailserver queue:

    exim -bp | grep to@domain.com | awk '{ print $4 }' | grep -v "^$" | xargs exim -Mrm

    -To remove selective emails

    grep user@domain.com /var/log/exim_mainlog | cut -d" " -f3 > list ; for ID in `cat list` ; do exim -Mrm $ID; done
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice