Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
  1. #1
    Member DigiCrime's Avatar
    Join Date
    Nov 2002
    Posts
    388

    Default Mail Queue Count

    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. #2
    Member
    Join Date
    Aug 2004
    Posts
    57

    Default

    the way that i used:

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

  3. #3
    Member DigiCrime's Avatar
    Join Date
    Nov 2002
    Posts
    388

    Default

    thats what I use I just typed it wrong Thought maybe there was another way

  4. #4
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    try

    exim -bpc

    Anup

  5. #5
    Member DigiCrime's Avatar
    Join Date
    Nov 2002
    Posts
    388

    Default

    Cool thanks

  6. #6
    Member Host4u2's Avatar
    Join Date
    Mar 2002
    Posts
    245

    Default

    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. #7
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    And what's the figure shown by WHM Mail Que?

    Anup

  8. #8
    Member Host4u2's Avatar
    Join Date
    Mar 2002
    Posts
    245

    Default

    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. #9
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    Quote Originally Posted by Host4u2
    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

    .
    Results self explanatory

    Anup

  10. #10
    Member Host4u2's Avatar
    Join Date
    Mar 2002
    Posts
    245

    Default

    Yeppers! The figures don't lie

  11. #11
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    Or perhaps you could try following for a clearer view

    exim -bp | exiqsumm



    Anup

  12. #12
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2003
    Location
    Houston, TX
    Posts
    378
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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. #13
    Member DigiCrime's Avatar
    Join Date
    Nov 2002
    Posts
    388

    Default

    timeout_frozen_after = 7d

    Change that to 2 days

    timeout_frozen_after = 2d

  14. #14
    Member
    Join Date
    Mar 2004
    Location
    This Planet
    Posts
    984

    Default

    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. #15
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2003
    Location
    Houston, TX
    Posts
    378
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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.

Similar Threads & Tags
Similar threads

  1. Replies: 4
    Last Post: 03-16-2011, 08:45 AM
  2. Difference between ConfigServer Mail Queue and Mail Queue Manager
    By fearmydesign in forum E-mail Discussions
    Replies: 4
    Last Post: 02-28-2011, 06:48 PM
  3. Replies: 4
    Last Post: 02-28-2011, 06:48 PM
  4. exim mail queue count
    By useradmin in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-14-2008, 09:54 AM
  5. ERROR 1136 at line 2: Column count doesn't match value count at row 1
    By greg in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-08-2003, 07:31 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube