diff -cr OP/pine4.60/imap/src/c-client/mail.h NP/pine4.60/imap/src/c-client/mail.h
*** OP/pine4.60/imap/src/c-client/mail.h	Tue May  4 20:09:45 2004
--- NP/pine4.60/imap/src/c-client/mail.h	Sat Jun 26 18:50:46 2004
***************
*** 703,708 ****
--- 703,709 ----
    } size;
    char *md5;			/* MD5 checksum */
    void *sparep;			/* spare pointer reserved for main program */
+   unsigned short topal_hack;    /* set to 1 if topal has wrecked the sending */
  };
  
  
Only in NP/pine4.60/imap/src/c-client: mail.h.orig
diff -cr OP/pine4.60/pine/pine.h NP/pine4.60/pine/pine.h
*** OP/pine4.60/pine/pine.h	Fri May  7 23:17:48 2004
--- NP/pine4.60/pine/pine.h	Sat Jun 26 18:52:31 2004
***************
*** 63,69 ****
  #ifndef _PINE_INCLUDED
  #define _PINE_INCLUDED
  
! #define PINE_VERSION		"4.60"
  #define	PHONE_HOME_VERSION	"-count"
  #define	PHONE_HOME_HOST		"docserver.cac.washington.edu"
  
--- 63,69 ----
  #ifndef _PINE_INCLUDED
  #define _PINE_INCLUDED
  
! #define PINE_VERSION		"4.60T"
  #define	PHONE_HOME_VERSION	"-count"
  #define	PHONE_HOME_HOST		"docserver.cac.washington.edu"
  
diff -cr OP/pine4.60/pine/send.c NP/pine4.60/pine/send.c
*** OP/pine4.60/pine/send.c	Thu May  6 18:47:28 2004
--- NP/pine4.60/pine/send.c	Sat Jun 26 18:58:14 2004
***************
*** 5186,5191 ****
--- 5186,5201 ----
      pbf = save_previous_pbuf;
      g_rolenick = NULL;
  
+     if ((*body)->type == TYPEMULTIPART 
+ 	&& (*body)->topal_hack == 1)
+       /* This was a single part message which Topal mangled. */
+       (*body)->type = TYPETEXT;
+     if ((*body)->type == TYPEMULTIPART
+ 	&& (*body)->topal_hack != 1)
+       /* Topal mangled a multipart message.  So the first nested part
+ 	 is really TYPETEXT. */
+       (*body)->nested.part->body.type = TYPETEXT;
+     
      dprint(4, (debugfile, "=== send returning ===\n"));
  }
  
***************
*** 6596,6608 ****
  
  				rfc822_parse_content_header(nb,
  				    (char *) ucase((unsigned char *) buf+8),s);
! 				if(nb->type == TYPETEXT
! 				   && nb->subtype
  				   && (!b->subtype 
  				       || strucmp(b->subtype, nb->subtype))){
  				    if(b->subtype)
  				      fs_give((void **) &b->subtype);
  
  				    b->subtype  = nb->subtype;
  				    nb->subtype = NULL;
  				      
--- 6606,6618 ----
  
  				rfc822_parse_content_header(nb,
  				    (char *) ucase((unsigned char *) buf+8),s);
! 				if(nb->subtype
  				   && (!b->subtype 
  				       || strucmp(b->subtype, nb->subtype))){
  				    if(b->subtype)
  				      fs_give((void **) &b->subtype);
  
+ 				    b->type     = nb->type;
  				    b->subtype  = nb->subtype;
  				    nb->subtype = NULL;
  				      
***************
*** 6610,6615 ****
--- 6620,6627 ----
  				    b->parameter = nb->parameter;
  				    nb->parameter = NULL;
  				    mail_free_body_parameter(&nb->parameter);
+ 				    if (b->type != TYPETEXT)
+ 				      b->topal_hack = 1;
  				}
  
  				mail_free_body(&nb);
***************
*** 9254,9270 ****
    dprint(4, (debugfile, "-- pine_encode_body: %d\n", body ? body->type : 0));
    if (body) switch (body->type) {
    case TYPEMULTIPART:		/* multi-part */
!     if (!body->parameter) {	/* cookie not set up yet? */
!       char tmp[MAILTMPLEN];	/* make cookie not in BASE64 or QUOTEPRINT*/
!       sprintf (tmp,"%ld-%ld-%ld=:%ld",gethostid (),random (),time (0),
! 	       getpid ());
!       body->parameter = mail_newbody_parameter ();
!       body->parameter->attribute = cpystr ("BOUNDARY");
!       body->parameter->value = cpystr (tmp);
!     }
!     part = body->nested.part;	/* encode body parts */
!     do pine_encode_body (&part->body);
!     while (part = part->next);	/* until done */
      break;
  /* case MESSAGE:	*/	/* here for documentation */
      /* Encapsulated messages are always treated as text objects at this point.
--- 9266,9284 ----
    dprint(4, (debugfile, "-- pine_encode_body: %d\n", body ? body->type : 0));
    if (body) switch (body->type) {
    case TYPEMULTIPART:		/* multi-part */
!     if (body->topal_hack != 1){
!       if (!body->parameter) {	/* cookie not set up yet? */
! 	char tmp[MAILTMPLEN];	/* make cookie not in BASE64 or QUOTEPRINT*/
! 	sprintf (tmp,"%ld-%ld-%ld=:%ld",gethostid (),random (),time (0),
! 		 getpid ());
! 	body->parameter = mail_newbody_parameter ();
! 	body->parameter->attribute = cpystr ("BOUNDARY");
! 	body->parameter->value = cpystr (tmp);
!       }
!       part = body->nested.part;	/* encode body parts */
!       do pine_encode_body (&part->body);
!       while (part = part->next);	/* until done */
!     }
      break;
  /* case MESSAGE:	*/	/* here for documentation */
      /* Encapsulated messages are always treated as text objects at this point.
***************
*** 9435,9441 ****
  
      dprint(4, (debugfile, "-- pine_rfc822_output_body: %d\n",
  	       body ? body->type : 0));
!     if(body->type == TYPEMULTIPART) {   /* multipart gets special handling */
  	part = body->nested.part;	/* first body part */
  					/* find cookie */
  	for (param = body->parameter; param && !cookie; param = param->next)
--- 9449,9456 ----
  
      dprint(4, (debugfile, "-- pine_rfc822_output_body: %d\n",
  	       body ? body->type : 0));
!     if(body->type == TYPEMULTIPART
!        && body->topal_hack != 1) {   /* multipart gets special handling */
  	part = body->nested.part;	/* first body part */
  					/* find cookie */
  	for (param = body->parameter; param && !cookie; param = param->next)
***************
*** 9495,9501 ****
  	 * Convert text pieces to canonical form
  	 * BEFORE applying any encoding (rfc1341: appendix G)...
  	 */
! 	if(body->type == TYPETEXT && body->encoding != ENCBASE64){
  	    gf_link_filter(gf_local_nvtnl, NULL);
  	}
  
--- 9510,9517 ----
  	 * Convert text pieces to canonical form
  	 * BEFORE applying any encoding (rfc1341: appendix G)...
  	 */
! 	if((body->type == TYPETEXT && body->encoding != ENCBASE64)
! 	   | (body->type == TYPEMULTIPART && body->topal_hack == 1)){
  	    gf_link_filter(gf_local_nvtnl, NULL);
  	}
  
***************
*** 9595,9609 ****
  			      ? body->subtype
  			      : rfc822_default_subtype (body->type))))
  	  return(pwbh_finish(0, so));
! 	    
  	if (param){
! 	    do
! 	      if(!(so_puts(so, "; ")
! 		   && rfc2231_output(so, param->attribute, param->value,
! 				     (char *) tspecials,
! 				     ps_global->VAR_CHAR_SET)))
! 		return(pwbh_finish(0, so));
! 	    while (param = param->next);
  	}
  	else if(!so_puts(so, "; CHARSET=US-ASCII"))
  	  return(pwbh_finish(0, so));
--- 9611,9637 ----
  			      ? body->subtype
  			      : rfc822_default_subtype (body->type))))
  	  return(pwbh_finish(0, so));
! 	
  	if (param){
! 	  do
! 	    if(body->topal_hack == 1 
! 	       && !struncmp(param->attribute, "protocol", 9))
! 	      {
! 		if(!(so_puts(so, "; \015\012\011")
! 		     && rfc2231_output(so, param->attribute, param->value,
! 				       (char *) tspecials,
! 				       ps_global->VAR_CHAR_SET)))
! 		  return(pwbh_finish(0, so));
! 	      }
! 	    else
! 	      {
! 		if(!(so_puts(so, "; ")
! 		     && rfc2231_output(so, param->attribute, param->value,
! 				       (char *) tspecials,
! 				       ps_global->VAR_CHAR_SET)))
! 		  return(pwbh_finish(0, so));
! 	      }
! 	  while (param = param->next);
  	}
  	else if(!so_puts(so, "; CHARSET=US-ASCII"))
  	  return(pwbh_finish(0, so));
***************
*** 9834,9840 ****
      long  l = 0L;
      PART *part;
  
!     if(body->type == TYPEMULTIPART) {   /* multipart gets special handling */
  	part = body->nested.part;	/* first body part */
  	do				/* for each part */
  	  l += send_body_size(&part->body);
--- 9862,9869 ----
      long  l = 0L;
      PART *part;
  
!     if(body->type == TYPEMULTIPART
!        && body->topal_hack != 1) {   /* multipart gets special handling */
  	part = body->nested.part;	/* first body part */
  	do				/* for each part */
  	  l += send_body_size(&part->body);
