Subject: MIME attachments, solaris 2.3, pine 3.93

From: [email-masked] (Steven McElwee)
Date: 19 Jun 1996 20:53:13 -0400

For several weeks, we've been testing pine 3.93 on several solaris 2.3 sun 
systems and have encountered some difficulty in viewing and sending
MIME attachments. The latter problem is as follows:

1. In the compose message window, the name of a valid ascii text file
is typed after the "attchmnt:" rfc822 header.

2. The message is sent.

3. A highlighted bar appears at the bottom of the window that reads
like this:
		[Sending mail |		0%]
Pine hangs. The highlighted header remains parked at "0%" and is never
updated. The pine process has to be killed in order to regain the shell prompt.

4. Before the process is killed, a scan of the process table reveals
the following:

 root@hector# ps -ef | egrep 'pine|sendmail'
  steven 16320 16317 19 19:52:21 pts/13   0:00 /usr/lib/sendmail -oi -oem -t
  steven 16317 16307 80 19:50:45 pts/13   0:02 pine393

This indicates that a pipe to /usr/lib/sendmail was opened.

5. Relevant lines from the .pine-debug1 file obtained from running
pine 3.93 at debug level 9 are:

====== context_mailbox: (sent-mail)
cancel_busy_alarm(-1)
Sending mail...
busy_alarm(1, Sending mail, 1120a8, 1)
q_status_message(Sending mail |          |)
output_message(Sending mail |          |)
STATUS cmd:120, max:1, min0
call_mailer: via pipe
Opening pipe: "/usr/lib/sendmail -oi -oem -t" (WRNP)
PID: 16328, COMMAND: /usr/lib/sendmail -oi -oem -t
alarm_signal()
alarm_signal()
    ...

NOTE: the "alarm_signal()" continues indefinitely until the process is
killed. 

	A similar test was performed with pine 3.91. No problems were 
encountered with sending an attachment. Pine 3.91 was also configured
to open a pipe to /usr/lib/sendmail with the same identical flags. The
sendmail program was not changed in any way. The sendmail daemon has
been running reliably for months now. I strongly doubt that there is a
problem here. I did not spot any problems with our mailcap or mime.types
files either. Any ideas or helpful suggestions about this are much
appreciated.

	The problem we experienced with viewing a MIME attachment
involved an rfc822 email message containing an embedded gif file
(image/gif MIME type) rather than a plain ascii text file. This email
message, along with the image/gif attachment, was originally generated
with pine 3.91 . Prior to trying to view the attachment with pine
3.93, it was first successfully viewed with pine 3.91. In other words,
the correct helper application was launched by pine 3.91. 

	When viewing pine 3.93, the gif file was displayed with the
correct helper application. However, after displaying the file, pine
3.93 dumped core and exited. This behavior, radically opposite from
that of pine 3.91, was observed with either of the following entries
in  ~/.mailcap:

		image/*; showpicture -viewer xv %s
or, alternatively,
		image/*; xv %s; test=test -n "$DISPLAY"

Relevant lines from the .pine-debug1 file generated from level 9 debug
mode are:

- mc_get_command(Image/GIF) -
mc_ctype_match: trying entry audio/* for Image/GIF
mc_ctype_match: trying entry image/* for Image/GIF
- mc_passes_test -
no test command, so Pass
mc_get_command: type=Image/GIF, command=showpicture -viewer xv %s
- mc_cmd_bldr -
built command: showpicture -viewer xv /usr/tmp/img-GIF015656
cancel_busy_alarm(-1)
exec_mailcap_cmd: command=(showpicture -viewer xv /usr/tmp/img-GIF015656 ; \
rm -f /usr/tmp/img-GIF015656) & (Note: this line is a continuation of \
								above line)

Opening pipe: "(showpicture -viewer xv /usr/tmp/img-GIF015656 ; rm -f \
/usr/tmp/img-GIF015656) & (Note: this line is a continuation of above line)
" (WT)
PID: 15657, COMMAND: (showpicture -viewer xv /usr/tmp/img-GIF015656 ; \
rm -f /usr    (Note: this line is a continuation of previous line)
/tmp/img-GIF015656) &

new mail called (0 2 0)

	As mentioned previously, i'll be performing similar tests on
pine 3.94 soon. However, i'd find it very helpful to understand why
this does not work. Any ideas are much appreciated.

	Thanks in advance.

Sincerely,
Steven McElwee

 -----------------------------------------------------------------------------
 Steven McElwee          |         Email -->      |  [email-masked]  
 OIT, System Admin.      |   <-- US Snail Mail    |  
 Duke University         |------------------------|---------------------------
 417 North Building      |  (919) 660-6914 (Work) |  (919) 660-7029 (Fax)
 Durham, NC 27706        |                        |  (919) 971-0781 (Cellular)
 -----------------------------------------------------------------------------