Problem
When I get email on SCO OpenServer 5/6, UW7 with Microsoft Office attachments, I have to save them to a file and transfer them to a Windows machine to be able to see the text in them. I'd like a quicker, easier way to see the text in these attachments.
Solution
For MicroSoft Word:There is an Open Source package called "catdoc" that will enable you to view the text in a Microsoft Word document attached to an email directly from scomail in OpenServer 5. This will keep you from having to save the attachment to a file and transfer it to a machine running Windows just to see the contents of the file.
To install catdoc on your machine and allow scomail to use it, follow these steps:
1. From:http://www.sco.com/skunkware/uw7/Packages/download the following:catdoc-xxxx.pkg(where "xxxx" is the current version number) into your /tmp directory. You may notice that this package is intended for UnixWare 7, but it will also work on OpenServer 5.
2. Install catdoc with the following:pkgadd -d /tmp/catdoc-xxxx.pkgwhere "xxxx" is the version number.3. Create a file called:/usr/local/bin/msword.scoeditand place the following text in it:
#---------CUT HERE----------############################################################### catdoc converts msword documents to ascii, obtained from opensource# scoedit uses /usr/tmp for its work directory# Note: scoedit does not allow for a pipe line as it requires a file.# This script is called "msword.scoedit" and requires executable# permissions to be set correctly to run when called. /usr/tmp is used# as the working directory below by scomail.fn=$1fn_new=`echo $fn | cut -d. -f1`/usr/local/bin/catdoc $fn > ${fn_new}.ascscoedit ${fn_new}.ascrm ${fn_new}.asc# end of script#---------CUT HERE----------4. Using your favorite text editor, modify:
/usr/lib/scomail/mailcapand add the following line, which will let scomail know what to do when it sees an attached file with the "application/msword" MIME type:
application/msword;/usr/local/bin/msword.scoedit %s >/dev/null
2>/dev/nullYou can add this line anywhere in the file. Make sure any other lines starting with "application/msword" are commented out. This is a system-wide file, so it will allow any user to be able to see Word documents.
5. root may still be unable to see Word attachments. To enable root to see them, make a file called:
/.mailcapand place this line in it (the same line as above):
application/msword;/usr/local/bin/msword.scoedit %s >/dev/null
2>/dev/null6. Give the newly created files the correct permissions by doing:
chmod 755 /usr/local/bin/catdoc
chmod 755 /usr/local/bin/msword.scoedit
chmod 644 /.mailcapAfter performing these steps, when someone sends you a Microsoft Word attachment, start scomail and double-click on the name of the attachment or go to "Message -> View Attachment" to see it.
For Excel:See: ftp://ftp2.sco.com/pub/skunkware/uw7/Packages/xlHtml-0.2.8.pkgInstall the package and run:# /usr/local/bin/xlHtml myspreadsheet > myfile.htmlThe file "myfile.html" can now be viewed with a HTML viewer, such as the Mozilla Broswer.
See also
Manual pages: mailcap(F), scomail(XC)