cron to attach a gz file

Peter Boosten peter at boosten.org
Thu Jan 31 23:48:06 PST 2008


perryh at 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 at 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


More information about the freebsd-questions mailing list