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: Anthony Boynes
Date:  
To: plug-discuss
Subject: Re: Creating a Script to see if amavis is alive
It would probably be better to be more specific in your grep statements.
When I run that on my system it also shows refused connections for when
remoted mail servers refused connections from my box, such as the
following:

Jul 18 07:36:42 localhost postfix/smtp[4949]: connect to
corp.bla-bla.com[216.105.165.74]: Connection refused (port 25)

This would work:

grep "127.0.0.1.*Connection refused" /var/log/mail.log


Just a thought.......


Anthony


--- wrote:
> I am trying to create a script to see if amavis is alive and upon
> failure send email to
>
> This is what I have so far.
>
>
> cat amavis.check
> grep Connection /var/log/mail.log |grep refused
>
> if success
> then cat /amavis.not.alive | mail [email][/email]
>
>
> The thought is that when amavis is failing there are messages like the
> one below in mail.log
>
> "Jul 20 11:59:09 mail postfix/qmgr[5764]: 25AE16F8DF:
> to=<>, relay=none, delay=7586, status=deferred (delivery
> temporarily suspended: connect to 127.0.0.1[127.0.0.1]: Connection
> refused)
>
>
> Jim
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>




        
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss