Subject: Viewing attachments - suffix not saved.

From: Andy Tsouladze <[email-masked]>
Date: Mon, 21 Dec 1998 17:43:38 +0200 (IST)

I was not able to find this problem in the archives, so I am reporting it
here.

When pine uses mailcap for viewing MIME attachments, it creates a
temporary file /var/tmp/<filename>, where <filename> is of a form:

img-<ABC><NNNNNN>

ABC is a three uppercase characters which seem to be derived from MIME
subtype (I am not really sure about it), while
NNNNNN is Pine PID padded on the left side with 0's. Unfortunately, Pine
drops the original file extension (suffix). E.g., if the attached file is
file.doc, the temporary file name may be something like img-MSW003462.

Some viewer programs are content if they are fed files without a proper
suffix, others are not.

In my situation, the problem is even worse. For reasons beyond the scope
of this posting, I have to pass attached files through a script which
deals with many file types and gets input from many programs. This
script has no way of knowing what the original file used to be.

So my suggestion is to keep the original file suffix, so that the
temporary file from my example above will look like img-MSW003462.doc.

Is there a workaround?

Regards,

Andy

Dr Andy Tsouladze
Unix System Administrator
Motorola Communications Israel
mailto:[email-masked]
mailto:[email-masked] (old)
mailto:[email-masked]
http://www.spl.co.il/~andy

-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Bob Rasmussen <[email-masked]>
Date: Mon, 21 Dec 1998 10:43:17 -0800 (PST)

On Mon, 21 Dec 1998, Andy Tsouladze wrote:

> ... 

We solved this problem by telling mailcap to run a shell script, telling that
script also (via a parameter) the MIME type, which we then parsed with a 'cut'
command. The script then in effect created a new file name, appending the
extension (derived from the MIME type) to the temporary file name.

Details can be found at
   www.anzio.com/support/pine.htm

Regards,
....Bob Rasmussen,   President,   Rasmussen Software, Inc.

personal e-mail: [email-masked]
 company e-mail: [email-masked] or [email-masked] or [email-masked]
 ftp://ftp.anzio.com               voice: 503-624-0360
http://www.anzio.com                 fax: 503-624-0760