From owner-freebsd-questions@FreeBSD.ORG Wed Sep 22 07:02:39 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 188BF106564A for ; Wed, 22 Sep 2010 07:02:39 +0000 (UTC) (envelope-from b.smeelen@ose.nl) Received: from mail.ose.nl (mail.ose.nl [212.178.134.164]) by mx1.freebsd.org (Postfix) with ESMTP id AF7DA8FC17 for ; Wed, 22 Sep 2010 07:02:38 +0000 (UTC) Received: from localhost ([127.0.0.1]) by mail.ose.nl for freebsd-questions@freebsd.org; Wed, 22 Sep 2010 09:02:37 +0200 Message-ID: <4C99AA0D.2010009@ose.nl> Date: Wed, 22 Sep 2010 09:02:37 +0200 From: Bas Smeelen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <201009212217.AA256967036@mail.Go2France.com> In-Reply-To: <201009212217.AA256967036@mail.Go2France.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: Software to SEND log files only? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2010 07:02:39 -0000 On 09/21/2010 10=3A17 PM=2C Len Conrad wrote=3A =3E ---------- Original Message ---------------------------------- =3E From=3A Ed Flecko =3Cedflecko=40gmail=2Ecom=3E =3E Date=3A Tue=2C 21 Sep 2010 12=3A56=3A13 -0700 =3E =3E =20 =3E=3E According to the FreeBSD website =3E=3E =28http=3A//www=2Efreebsd=2Eorg/doc/handbook/outgoing-only=2Ehtml=29= =2C the easiest =3E=3E way to send mail only is to install the mail/ssmtp port=2E =3E=3E =3E=3E Does anyone have an example of a script or other method =28maybe a c= ron =3E=3E script=3F=29 that would e-mail my log files to me daily=3F =3E=3E =20 =3E log files can be =28too=29 huge as smtp DATA=2E =20 =3E =3E I zip mine and use the mpack port to send the =2Ezip file as MIME attac= hment=2E =3E =3E Len You could install the logrotate port /usr/ports/sysutils/logrotate and switch the logfiles you want to this instead of newsyslog For webserver error logs I use something like this scripts which runs from cron =23!/bin/sh cd /home/www LOGFILES=3D=60ls */logfiles/errorlog=2Etxt=60 for i in =24LOGFILES do if =5B -s =24i =5D then tail -r -n 100 =24i =7Cmail -s =24i =3Cemail=5Faddress=3E fi done DISCLAIMER=3A This e-mail is for the intended recipient=28s=29 only=2E Acce= ss=2C disclosure=2C copying=2C distribution or reliance on any of it by anyone else is prohibited=2E If yo= u have received it by mistake please let us know by reply and then delete it from your system= =2E