Date: Wed, 22 Sep 2010 09:02:37 +0200 From: Bas Smeelen <b.smeelen@ose.nl> To: freebsd-questions@freebsd.org Subject: Re: Software to SEND log files only? Message-ID: <4C99AA0D.2010009@ose.nl> In-Reply-To: <201009212217.AA256967036@mail.Go2France.com> References: <201009212217.AA256967036@mail.Go2France.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C99AA0D.2010009>