cron to attach a gz file
fbsd.questions at rachie.is-a-geek.net
Fri Feb 1 08:31:27 PST 2008
On Friday 01 February 2008 08:48:02 Peter Boosten wrote:
> 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
Nice tip, thanks for that.
> From a modern mail reader point of view there is not much difference
> between a MIME or a uuencoded attachment.
But there is between an uuencoded /body/ and an attachment.
At the risk of this degrading into a mail useragent battle: kmail didn't give
an option to uudecode the body.
More information about the freebsd-questions