Mailing List CGatePro@mail.stalker.com Message #97217
From: Yuri Pismerov <yura@pismerov.ca>
Subject: Re: /usr/bin/mail binary replacement of CGP
Date: Sun, 08 Feb 2009 00:59:02 -0800
To: <CGatePro>
Not very elegant, but should work...

( /usr/bin/grep " incorrect password" /var/CommuniGate/SystemLogs/`date +%Y-%m-%d.log` || kill -9 $$ ) | /usr/bin/mail -E -s "Email Hacking Attempts" me@example.com



Stefan Seiz wrote:
> Hi,
>
> is there any chance, to get support for the -E flag in the /usr/bin/mail
> replacement from CommuniGate Pro.
>
> The -E flag in the regular mail command line interface surpresses sending of
> messages with an empty body which is very useful e.g. if you use grep and
> pipe to check logfiles and such and email the results out.
>
> I'd also be open to any hinst to a workaround as long as it doesn't involve
> the creation of a file (which could then be checked for content before
> mailing it).
>
> Here's an example srcipt i call through cron every night, where the -E
> switch would come in realy handy:
>
> /usr/bin/grep " incorrect password" /var/CommuniGate/SystemLogs/`date
> +%Y-%m-%d.log` | /usr/bin/mail -E -s "Email Hacking Attempts" me@example.com
>
> Thanks!
>
> --
> Stefan Seiz <http://www.StefanSeiz.com>
> Spamto: <bin@imd.net>
>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list <CGatePro@mail.stalker.com>.
> To unsubscribe, E-mail to: <CGatePro-off@mail.stalker.com>
> To switch to the DIGEST mode, E-mail to <CGatePro-digest@mail.stalker.com>
> To switch to the INDEX mode, E-mail to <CGatePro-index@mail.stalker.com>
> Send administrative queries to  <CGatePro-request@mail.stalker.com>
>  

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster