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.

Mail Queue Count

Discussion in 'E-mail Discussions' started by DigiCrime, Sep 28, 2004.

  1. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    Is it possible to get a total amount of emails in the queue from the command line rather then looking in WHM?

    ls -A /var/spool/mail | wc -l isnt very accurrate but it'd be nice if I could find out from a command line
     
  2. manghooli

    manghooli Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    the way that i used:

    use:
    Code:
    ls -l /var/spool/exim/input | wc -l
    devide the result by 2
     
  3. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    thats what I use I just typed it wrong :rolleyes: Thought maybe there was another way
     
  4. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    try

    exim -bpc

    Anup
     
  5. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    Cool thanks :)
     
  6. Host4u2

    Host4u2 Well-Known Member

    Joined:
    Mar 24, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    There is a big difference between the 2 commands...

    Code:
    ls -l /var/spool/exim/input | wc -l 
    returns: 4776

    Code:
    exim -bpc 
    returns: 1651


    .
     
  7. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    And what's the figure shown by WHM Mail Que?

    Anup
     
  8. Host4u2

    Host4u2 Well-Known Member

    Joined:
    Mar 24, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    Great question :) Current returns are as follows...

    Code:
    ls -l /var/spool/exim/input | wc -l 
    returns: 1997

    Code:
    exim -bpc 
    returns: 236

    WHM Queue returns: 236

    .
     
  9. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    Results self explanatory :)

    Anup
     
  10. Host4u2

    Host4u2 Well-Known Member

    Joined:
    Mar 24, 2002
    Messages:
    248
    Likes Received:
    0
    Trophy Points:
    16
    Yeppers! The figures don't lie :D
     
  11. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    Or perhaps you could try following for a clearer view

    exim -bp | exiqsumm

    :)

    Anup
     
  12. DomineauX

    DomineauX Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    414
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Great, and useful stuff to know!

    Thanks!

    Any clue what the best way would be to dump all queued mail older than a number of days such as 2 days?
     
  13. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    timeout_frozen_after = 7d

    Change that to 2 days

    timeout_frozen_after = 2d
     
  14. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    Yup could try by putting that in top box of WHM Exim Configuration editor as if you edit exim.conf from ssh, it would get overwritten in next exim update

    Anup
     
  15. DomineauX

    DomineauX Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    414
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Though I appreciate the edit, what I need is just a command to run if I happen to run across a server that has lots of old (beyond the number of days set for timeout) mail queued up.
    I was contracted to do some clean up work on a server for someone recently and found mail queued that was 89+ days old. And a total of about 12000 emails that were older than 4 days.
    Had to dump the entire queue as I could not find a way to delete all old stuff and leave current.
     
  16. capoinfra

    capoinfra Well-Known Member

    Joined:
    Oct 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Uruguay
    Hello all,

    I need to know how many mails are sent per hour via PHP script

    Is any command to make a emails sent count?

    Thanks in advance.-
     
  17. Danny_T

    Danny_T Well-Known Member

    Joined:
    Jul 19, 2005
    Messages:
    181
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Netherlands
    You can see it in WHM.
    https://yourserver:2087/scripts2/eximstats
     
Loading...

Share This Page