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.

Delete mails in queue with terminal

Discussion in 'E-mail Discussions' started by atlantis21, Jul 12, 2014.

  1. atlantis21

    atlantis21 Well-Known Member

    Joined:
    Sep 18, 2012
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi,


    How to delete all mails with date 11.07.2014. with sender name example@domain.com, and file size 650KB?
    How to do in terminal? I need help.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. dhasbrouck

    dhasbrouck Registered

    Joined:
    Jul 17, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    Here is a command I have been using to clear out emails. This would remove all emails that reference example@domain.com:

    PHP:
    grep -lr 'example@domain.com' /var/spool/exim/input/ |  sed -'s/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/gi' xargs exim -Mrm
    David
     
Loading...

Share This Page