From owner-freebsd-questions Fri Oct 11 21:29:19 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E93B37B401 for ; Fri, 11 Oct 2002 21:29:18 -0700 (PDT) Received: from russian-caravan.cloud9.net (russian-caravan.cloud9.net [168.100.1.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3686743E77 for ; Fri, 11 Oct 2002 21:29:18 -0700 (PDT) (envelope-from Hostmaster@Video2Video.Com) Received: from earl-grey.cloud9.net (earl-grey.cloud9.net [168.100.1.1]) by russian-caravan.cloud9.net (Postfix) with ESMTP id A164132638; Sat, 12 Oct 2002 00:29:17 -0400 (EDT) Date: Sat, 12 Oct 2002 00:29:17 -0400 (EDT) From: Peter Leftwich X-X-Sender: To: Charles Pelletier Cc: FreeBSD LIST Subject: Re: cron emails In-Reply-To: <000a01c2719e$3f62b480$32040101@hume> Message-ID: <20021012001842.Q60656-100000@earl-grey.cloud9.net> Organization: Video2Video Services - http://Www.Video2Video.Com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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/ `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