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!

Delete mails in queue with terminal

Discussion in 'E-mail Discussion' 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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,809
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    The Exim cheatsheet is very helpful with these types of commands:

    Exim Cheatsheet

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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

  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