Date: Sat, 12 Oct 2002 00:29:17 -0400 (EDT) From: Peter Leftwich <Hostmaster@Video2Video.Com> To: Charles Pelletier <fozekizer@attbi.com> Cc: FreeBSD LIST <freebsd-questions@FreeBSD.ORG> Subject: Re: cron emails Message-ID: <20021012001842.Q60656-100000@earl-grey.cloud9.net> In-Reply-To: <000a01c2719e$3f62b480$32040101@hume>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 11 Oct 2002, Charles Pelletier wrote: > How do I go about setting up a cron job to email security logs (weekly)? and > is there a way to set IPF to email attack notifications? > Charles Pelletier > Tech. Coordinator > St Luke's School First of all, familiarize yourself with the format of /etc/crontab (system-wide) or the user's own file, /var/cron/tabs/<username_here> `man cron` and `man crontab` are really pretty well written! The format for cron is basically "X minutes after hour X on the X'th day of month X -OR- each X day-of-the-week RUN the rest of this command line" For example: 0 24 * * 6 /usr/bin/mail -s security_weekly fozekizer@attbi.com < /var/log/security This command would email you the file /var/log/security with the subject "security_weekly" every Saturday morning at midnight (or think of it as close of day Friday night). I'm not sure, but maybe it is 0 not 24. For your IPF question, you could set something similar in /etc/syslog.conf I bet. Someone on the list may have better knowledge about IPF... Hope this helps! -- Peter Leftwich President & Founder Video2Video Services Box 13692, La Jolla, CA, 92039 USA +1-413-403-9555 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021012001842.Q60656-100000>