[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] [OFF TOPIC] script to do cat /var/log/maillog | grep DENIED
- Subject: Re: [cobalt-users] [OFF TOPIC] script to do cat /var/log/maillog | grep DENIED
- From: Gerald Young <me@xxxxxxxxxxx>
- Date: Wed Nov 7 21:42:44 2001
- Organization: Coolcat Dot Net
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> > At the moment i type,
> > cat /var/log/maillog | grep DENIED
> >
> > to see if there have been any mails denied today.
> >
> > Can someone make me a script that will do this for me at regular
> > intervals? (and maybee send the results to email or html).
>
could use 2 liner
#!/bin/sh
cat /var/log/maillog | grep DENIED | mail you@xxxxxxxxxxxxxx
## above to email you or could just write to a file which u would need to clean out every so often - maybe another cron say weekly to remove it?
#!/bin/sh
cat /var/log/maillog | grep DENIED >> /home/sites/sitexx/web/deniedstuff
pop into one of the cron directories and chmod 755 have to be root
ie
/etc/cron.hourly
/etc/cron.daily
b w g
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>
>
---------------------------------------------------
http://www.coolcat.net http://www.coolcoach.net
8:01am up 9 days, 15:20,
If Bill Gates had a nickel for every time Windows crashed... Oh wait, he does.