On Sun, Mar 04, 2007 at 09:09:59PM +0200, Henrik Krohns wrote:
> On Sun, Mar 04, 2007 at 10:57:32AM -0800, MrC wrote:
> > > Does anyone know of a good method to monitor the postfix 
> > > queue and send an alert if it exceeds a certain number of 
> > > messages?  We've been getting a backup and I'm trying to 
> > > "tweak" the max_servers setting.  If it's at 10 I often get a 
> > > backup, 20 works, but sometimes starts pushing the "memory" 
> > > limits of the server.  I don't have time to sit and watch it 
> > > all day :) - and it would be nice to have an alert sent to me 
> > > if it's getting backed up. Then I could set it at 12 or 15 
> > > and just let it run for awhile without having to remember to 
> > > go "look" all of the time!
> > > 
> > > Any ideas appreciated.
> > > 
> > > Thanks.
> > > 
> > > Danita
> > 
> > POSTFIX_SRC/auxiliary/qshape/qshape.pl
> > 
> > The souce has internal documentation.
> 
> A bit complicated if you look at the original question..
> 
> Simple script in crontab would solve it:
> 
> -------------------------------------------------------------
> #!/bin/bash
> QSIZE="`postqueue -p | tail -1 | awk '{print $5}'`"
> if [ "0$QSIZE" > 50 ]; then
>   echo "Postfix queue size $QSIZE!" | mail [EMAIL PROTECTED]
> fi
> -------------------------------------------------------------

  Mind you, if your queue size has just shot to 1000 and is growing
without bound because mail is not being delivered, how long will it
take that email to get through the same server?

  A: After you have independently discovered or been notified of it and
resolved the problem in some other way, and the queue has finished
draining.
 
  It can be useful to think out some alternate notification methods for
severe mail delivery problems: 
  send an SMTP trap to a monitor that can page you;
  send mail via "netcat" or a tiny SMTP client that delivers directly to an
alternate machine;
  etc. 

  -- Clifton

-- 
    Clifton Royston  --  [EMAIL PROTECTED] / [EMAIL PROTECTED]
       President  - I and I Computing * http://www.iandicomputing.com/
 Custom programming, network design, systems and network consulting services

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to