From owner-freebsd-questions@FreeBSD.ORG Fri Feb 1 07:48:06 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 5233916A418 for ; Fri, 1 Feb 2008 07:48:06 +0000 (UTC) (envelope-from peter@boosten.org) Received: from smtpq1.groni1.gr.home.nl (smtpq1.groni1.gr.home.nl [213.51.130.200]) by mx1.freebsd.org (Postfix) with ESMTP id 1239713C455 for ; Fri, 1 Feb 2008 07:48:06 +0000 (UTC) (envelope-from peter@boosten.org) Received: from [213.51.130.188] (port=33371 helo=smtp3.groni1.gr.home.nl) by smtpq1.groni1.gr.home.nl with esmtp (Exim 4.60) (envelope-from ) id 1JKqd2-0000ah-E6; Fri, 01 Feb 2008 08:48:04 +0100 Received: from cp268254-a.landg1.lb.home.nl ([84.25.65.88]:4807 helo=ra.egypt.nl) by smtp3.groni1.gr.home.nl with esmtp (Exim 4.60) (envelope-from ) id 1JKqd1-0001IM-Pa; Fri, 01 Feb 2008 08:48:04 +0100 Received: from [127.0.0.1] (xp.egypt.nl [192.168.13.35]) by ra.egypt.nl (Postfix) with ESMTP id 1E41D3987B; Fri, 1 Feb 2008 08:48:03 +0100 (CET) Message-ID: <47A2CEB2.2000705@boosten.org> Date: Fri, 01 Feb 2008 08:48:02 +0100 From: Peter Boosten User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: perryh@pluto.rain.com References: <94136a2c0801310049k22d7a890kac8a2482ac49333c@mail.gmail.com> <47A18DA9.50207@boosten.org> <47a2c295.zZbt1U/oWvbDh508%perryh@pluto.rain.com> In-Reply-To: <47a2c295.zZbt1U/oWvbDh508%perryh@pluto.rain.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080201-0, 02/01/2008), Outbound message X-Antivirus-Status: Clean X-Spam-Score: -0.0 (/) Cc: zszalbot@gmail.com, 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:48:06 -0000 perryh@pluto.rain.com wrote: >>> 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 From a modern mail reader point of view there is not much difference between a MIME or a uuencoded attachment. Peter -- http://www.boosten.org