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

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

  1. mail2sacp

    mail2sacp Well-Known Member

    Joined:
    Feb 25, 2007
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    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:
    2
    Trophy Points:
    18
    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
     
  3. mail2sacp

    mail2sacp Well-Known Member

    Joined:
    Feb 25, 2007
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    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