Re: Creating a Script to see if amavis is alive

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: elemint@theriver.com
Date:  
To: plug-discuss
Subject: Re: Creating a Script to see if amavis is alive
This is what I have now but it is not working I thik the problem is
where I am trying to tell the script if it is greater than 15 send an
email saying amavis down


#!/bin/bash
# Start script
if /utilities/checkque > "0" then cat /amavis.not.alive | mail
[email][/email]
#fi
# End script


cat /amavis.not.alive
Amavis is not accepting connections

cat /checkque
postqueue -p |grep ^[0-9] |wc -l


Jim




Jeremy C. Reed wrote:

>On Wed, 21 Jul 2004, Craig White wrote:
>
>
>
>>but if new mail comes in, doesn't postfix hold it in the queue until
>>amavis is ready? Does mail (postfix) refuse mail?
>>
>>
>
>Depends on how postfix is configured.
>
>
>
>>Also, how does one 'script' a telnet login, capture standard out and
>>then logout? That's what I cannot fathom.
>>
>>
>
>(echo quit ; sleep 3) | telnet 127.0.0.1 10024 2>&1 |       grep -q
>'telnet:.*Connection refused' && echo "Not open"

>
>
>I did something like this long ago ...
> http://www.reedmedia.net/software/check_services/
>
> Jeremy C. Reed
>
>                 BSD News, BSD tutorials, BSD links
>                http://www.bsdnewsletter.com/

>
>
>
>
>
>---------------------------------------------------
>PLUG-discuss mailing list -
>To subscribe, unsubscribe, or to change you mail settings:
>http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>
>



---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss