The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to delete the mail in queue for perticular domain.

Discussion in 'E-mail Discussions' started by ngchandak, Jun 20, 2005.

  1. ngchandak

    ngchandak Well-Known Member

    Joined:
    Apr 5, 2005
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    Hi,

    There are 5000+ email are in queue, my problem is that, i want to delete the email for the perticular domain from the queue. to do so please advice me.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You'll need to delete the files directly from /var/spool/exim/input/* and /var/spool/exim/msglog/*. You can di it most simply using grep and piping to rm, this would probably do it:

    grep -ri "domain\.com" /var/spool/exim/input/* | rm -fv
     
  3. ngchandak

    ngchandak Well-Known Member

    Joined:
    Apr 5, 2005
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    mail queue problem

    Hi,

    I applied the command but no luck, i want remove all the emails queue for perticular domain like xyz.com. suppose there are 5000+ mails are in queue for xyz.com. so i want delete all the mail queue for xyz.com. Please help me
     
  4. nickb

    nickb Well-Known Member

    Joined:
    Feb 25, 2005
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
  5. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Try:

    exiqgrep -ir <domain> | xargs -n1 exim -Mrm

    that should remove any e-mail that is in the queue that is waiting to be delivered to POP accounts at <domain>.
     
  6. ispro

    ispro Well-Known Member

    Joined:
    Apr 8, 2004
    Messages:
    628
    Likes Received:
    1
    Trophy Points:
    18
    The HOWTO!

    Anyone looking for GOOD script, read my post there.
     
Loading...

Share This Page