From owner-freebsd-questions@FreeBSD.ORG Fri Feb 1 07:13:53 2008 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 4D4EC16A418 for ; Fri, 1 Feb 2008 07:13:53 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 3172713C44B for ; Fri, 1 Feb 2008 07:13:53 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id m117D7lv056520 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 31 Jan 2008 23:13:07 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id m117D7LM056519; Thu, 31 Jan 2008 23:13:07 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA12751; Thu, 31 Jan 08 23:00:31 PST Date: Thu, 31 Jan 2008 22:56:21 -0800 From: perryh@pluto.rain.com To: zszalbot@gmail.com, peter@boosten.org Message-Id: <47a2c295.zZbt1U/oWvbDh508%perryh@pluto.rain.com> References: <94136a2c0801310049k22d7a890kac8a2482ac49333c@mail.gmail.com> <47A18DA9.50207@boosten.org> In-Reply-To: <47A18DA9.50207@boosten.org> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: cron to attach a gz file 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: Fri, 01 Feb 2008 07:13:53 -0000 > > I know I can use > > > > mail -s "logfile " < /var/log/httpd_access.log > > > > in cron to email the content of a log file to a particular email > > address but how do I make that log file a binary attachment (*.gz)? > > gzip -c /var/log/httpd_access.log | uuencode httpd_access.log.gz | mail > -s "logfile" someone@somewhere If you want an actual MIME attachment, see /usr/ports/mail/nail