Thx to all.
#!/bin/bash MSGNO=$(/usr/sbin/exiqgrep -b * | wc -l) if [ $MSGNO -gt 2500 ]; then echo "Queue Overloded - Estao por entregar $MSGNO emails" > /root/queue.txt mail -s "Alerta de queue de mail" [email protected] < /root/queue.txt fi From: John Hall [mailto:[email protected]] Sent: sexta-feira, 16 de Dezembro de 2011 11:29 To: John Burnham Cc: Miguel Coucello; [email protected] Subject: Re: [exim] Need Help On 16 December 2011 09:45, John Burnham <[email protected]> wrote: > > I need a script, or help doing one. > > I need a script that sends me an email when qeue is bigger than 2.500 > emails. > > Can anyone help me ? > Totally untested and before I've finished my coffee, but here's some pseudo code #!/bin/bash MSGNO=$(/path/to/exiqgrep -b * | wc -l) exim -bpc is probably a more efficient way of getting the number of messages in the queue. regards, John -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
