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.

Get notified when queue exceeds more than 500 emails

Discussion in 'E-mail Discussions' started by ::Gomez::, Mar 26, 2015.

  1. ::Gomez::

    ::Gomez:: Member

    Joined:
    Oct 13, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi, I am looking for a simple way to get notified each time the email queue gets full with 500 emails or more..

    How can I achieve this?

    I have installed Config server mail queue manager but it doesnt have this option.
     
  2. Patrick Heinz

    Patrick Heinz Active Member

    Joined:
    Mar 14, 2015
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Brasil
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi hermano,
    Didn't tried, but you can do some like this script:

    Code:
    #!/bin/bash
    queue=`/usr/sbin/exim -bpc`
    
    if [ $queue -gt "500" ]; then
          mail -s "Queue alert!" some@email.com
    fi 
     
    triantech likes this.
  3. ::Gomez::

    ::Gomez:: Member

    Joined:
    Oct 13, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks will try It!

    I save it as .cgi ?
     
  4. Patrick Heinz

    Patrick Heinz Active Member

    Joined:
    Mar 14, 2015
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Brasil
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,
    Its a shell script. So you can save as .sh, and add on your crontab, setting the time you will prefer to check the queue.
    Crontab examples
     
  5. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    262
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    If you also have Config Server Firewall running, you can just set the LF_QUEUE_ALERT option.
     
    Patrick Heinz likes this.
  6. ::Gomez::

    ::Gomez:: Member

    Joined:
    Oct 13, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    That´s exactly what I was looking for. Thanks a lot kdean.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page