From owner-freebsd-questions Fri Sep 29 4:37:12 2000 Delivered-To: freebsd-questions@freebsd.org Received: from osiris.ipform.ru (osiris.ipform.ru [212.158.165.98]) by hub.freebsd.org (Postfix) with ESMTP id D906837B53A for ; Fri, 29 Sep 2000 04:32:41 -0700 (PDT) Received: from wp2 (wp2 [192.168.0.12]) by osiris.ipform.ru (8.11.0/8.11.0) with SMTP id e8TBWIR48589; Fri, 29 Sep 2000 15:32:21 +0400 (MSD) (envelope-from matrix@ipform.ru) Message-ID: <030f01c02a08$ef6ee0e0$0c00a8c0@ipform.ru> From: "Artem Koutchine" To: "Peter Salvage" , References: <037101c02a06$f9621920$0200a8c0@ait.co.za> Subject: Re: Cron question - emailing and cycling Exim maillog Date: Fri, 29 Sep 2000 15:32:13 +0400 Organization: IP Form MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hmm... well as far as i understand: create a simple sh script, which emails you the log and then calls exicyclog something like: #!/bin/sh cat /var/log/exim.main | mail eximadmin@somewhere.dom exicyclog consult man on mail for proper params. ----- Original Message ----- From: "Peter Salvage" To: Sent: Friday, September 29, 2000 3:18 PM Subject: Cron question - emailing and cycling Exim maillog > Hi all > > I use Exim 3.16 as our MTA and would like to email the daily log to a remote > mailbox, then cycle the logfile. There is an utility included in the distro > of Exim, called exicyclog, which accomplishes the cycling... > > I've read the Exim utilities man page on exicyclog and have created a > crontab file called "exim" in /var/cron/tabs which contains the following > line: > 1 0 * * * /usr/exim/bin/exicyclog > > This calls the log cycling script just after midnight every day which > renames the log to mainlogx where x is an integer from 1 to a predetermined > maximum, defaulting to 10. So far so good... > > But...(there's always a but), I would like to also be able to set up a cron > job to email the logfile daily, just before running the exicyclog script. > > If the exicyclog is incrementing the log by 1 every time it's run, how would > I instruct cron to mail the day's log??? > > TIA > /wiZZ > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message