[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] OT: [raq3] How to mail a binary file through a script
- Subject: [cobalt-users] OT: [raq3] How to mail a binary file through a script
- From: Joseph R Brennskag <jbrennsk@xxxxxxxxxxxx>
- Date: Wed Sep 4 08:35:02 2002
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
Hello...
I am not experienced at writing scripts, but I can put together a basic
shell script. What I want to do is have the compressed access log file
mailed to me automatically.
In my logrotate script, I have the log files mailed to me prior to being
expunged so that I can archive them.
In logrotate, I am using the compress option and the mail option. Before
mailing, logrotate it seems uncompresses the compressed log file. This is
fine for most log files except access which exceeds the mail size limit when
uncompressed. I don't want to increase the mail size to the amount necessary
to accomodate the uncompressed file as this would apply serverwide.
What can I use in a shell script that will mail the compressed (gz) file? I
have tried 'mail admin < /path/access.1.gz', but it sends the file as
'text'. I have tried 'pine admin -attach /path/access.1.gz', which will mail
the file as an attachment, but pine is waiting for the "CTRL-X" send
command.
Joe Brennskag
Hardy Telecom
304-897-9911
joe@xxxxxxxxxxxx