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 to clear mailqueue weekly.

Discussion in 'E-mail Discussion' started by mail2sacp, May 24, 2007.

  1. mail2sacp

    mail2sacp Well-Known Member

    Joined:
    Feb 25, 2007
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    I am having 10 servers and 100 sites on each server.

    The weekly mailqueue is above 8000 and I do clear it every weekend.

    I do weekly setps for mail queue as below.

    1) remove frozen & bounce mails
    2) all other mails.
    3) last 2days mails
    4) mails from nobody@servername


    If there is any other method from which I can remove unwanted mails from my server?
    Is there any way from which I can remove mails mentioned in above steps?

    Please update if anyone do this task or if anyone have idea.

    -Mail2SacP
     
  2. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Planet Earth
    You cna setup cron for following commands:

    To delete all messages from the queue:

    exim -bpru|awk {'print $3'}|xargs exim -Mrm

    To delete frozen messages from the Exim queue :

    exim -bpru|grep frozen|awk {'print $3'}|xargs exim -Mrm
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mail2sacp

    mail2sacp Well-Known Member

    Joined:
    Feb 25, 2007
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    156
    Hi,

    I just wanted to know if I can get mails of total counts for the below mentioned tasks.

    1) remove frozen & bounce mails
    2) all other mails.
    3) last 2days mails
    4) mails from nobody@servername

    I want to get the total count of each point in one file.

    If you know it please let me know it.

    -Mail2Sacp.
     
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