topal-81/pine-4.44.patch 0000644 0001750 0001750 00000017262 14231232503 013101 0 ustar pjb pjb Only in pine4.44: .bld.hlp Only in pine4.44: bin diff -rc OP/pine4.44/imap/src/c-client/mail.h pine4.44/imap/src/c-client/mail.h *** OP/pine4.44/imap/src/c-client/mail.h Tue Nov 13 19:50:10 2001 --- pine4.44/imap/src/c-client/mail.h Thu Apr 11 10:21:36 2002 *************** *** 621,626 **** --- 621,627 ---- unsigned long bytes; /* size of text in octets */ } size; char *md5; /* MD5 checksum */ + unsigned short topal_hack; /* set to 1 if topal has wrecked the sending */ }; Only in pine4.44/pine: date.c diff -rc OP/pine4.44/pine/pine.h pine4.44/pine/pine.h *** OP/pine4.44/pine/pine.h Tue Jan 8 20:55:49 2002 --- pine4.44/pine/pine.h Thu Apr 11 10:21:36 2002 *************** *** 63,69 **** #ifndef _PINE_INCLUDED #define _PINE_INCLUDED ! #define PINE_VERSION "4.44" #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.44T" #define PHONE_HOME_VERSION "-count" #define PHONE_HOME_HOST "docserver.cac.washington.edu" diff -rc OP/pine4.44/pine/send.c pine4.44/pine/send.c *** OP/pine4.44/pine/send.c Tue Jan 8 20:59:37 2002 --- pine4.44/pine/send.c Thu Apr 11 11:00:40 2002 *************** *** 4695,4700 **** --- 4695,4710 ---- 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")); } *************** *** 5956,5968 **** ; rfc822_parse_content_header(nb,ucase(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; --- 5966,5978 ---- ; rfc822_parse_content_header(nb,ucase(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; *************** *** 5970,5975 **** --- 5980,5987 ---- 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); *************** *** 8506,8522 **** 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. --- 8518,8536 ---- 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. *************** *** 8688,8694 **** 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) --- 8702,8709 ---- 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) *************** *** 8741,8747 **** * Convert text pieces to canonical form * BEFORE applying any encoding (rfc1341: appendix G)... */ ! if(body->type == TYPETEXT){ gf_link_filter(gf_local_nvtnl, NULL); #if defined(DOS) || defined(OS2) --- 8756,8763 ---- * Convert text pieces to canonical form * BEFORE applying any encoding (rfc1341: appendix G)... */ ! if(body->type == TYPETEXT ! | (body->type == TYPEMULTIPART && body->topal_hack == 1)){ gf_link_filter(gf_local_nvtnl, NULL); #if defined(DOS) || defined(OS2) *************** *** 8845,8859 **** ? 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)); --- 8861,8887 ---- ? 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)); *************** *** 9111,9117 **** 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); --- 9139,9146 ---- 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); topal-81/pine-4.50.patch 0000644 0001750 0001750 00000017355 14231232503 013101 0 ustar pjb pjb Only in pine4.50/: .bld.hlp Only in pine4.50/: bin diff -cr OP/pine4.50/imap/src/c-client/mail.h pine4.50/imap/src/c-client/mail.h *** OP/pine4.50/imap/src/c-client/mail.h Tue Oct 29 01:10:29 2002 --- pine4.50/imap/src/c-client/mail.h Fri Nov 22 11:42:08 2002 *************** *** 651,656 **** --- 651,657 ---- unsigned long bytes; /* size of text in octets */ } size; char *md5; /* MD5 checksum */ + unsigned short topal_hack; /* set to 1 if topal has wrecked the sending */ }; Only in pine4.50/imap/src/c-client: mail.h.orig Only in pine4.50/pine: date.c diff -cr OP/pine4.50/pine/pine.h pine4.50/pine/pine.h *** OP/pine4.50/pine/pine.h Wed Nov 20 18:19:44 2002 --- pine4.50/pine/pine.h Fri Nov 22 11:42:38 2002 *************** *** 63,69 **** #ifndef _PINE_INCLUDED #define _PINE_INCLUDED ! #define PINE_VERSION "4.50" #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.50T" #define PHONE_HOME_VERSION "-count" #define PHONE_HOME_HOST "docserver.cac.washington.edu" Only in pine4.50/pine: pine.h.orig Only in pine4.50/pine: pine.h.rej diff -cr OP/pine4.50/pine/send.c pine4.50/pine/send.c *** OP/pine4.50/pine/send.c Wed Nov 20 22:51:49 2002 --- pine4.50/pine/send.c Fri Nov 22 11:42:08 2002 *************** *** 4764,4769 **** --- 4764,4779 ---- 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")); } *************** *** 6076,6088 **** ; rfc822_parse_content_header(nb,ucase(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; --- 6086,6098 ---- ; rfc822_parse_content_header(nb,ucase(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; *************** *** 6090,6095 **** --- 6100,6107 ---- 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); *************** *** 8726,8742 **** 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. --- 8738,8756 ---- 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. *************** *** 8906,8912 **** 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) --- 8920,8927 ---- 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) *************** *** 8966,8972 **** * Convert text pieces to canonical form * BEFORE applying any encoding (rfc1341: appendix G)... */ ! if(body->type == TYPETEXT){ gf_link_filter(gf_local_nvtnl, NULL); } --- 8981,8988 ---- * Convert text pieces to canonical form * BEFORE applying any encoding (rfc1341: appendix G)... */ ! if(body->type == TYPETEXT ! | (body->type == TYPEMULTIPART && body->topal_hack == 1)){ gf_link_filter(gf_local_nvtnl, NULL); } *************** *** 9075,9089 **** ? 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)); --- 9091,9117 ---- ? 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)); *************** *** 9341,9347 **** 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); --- 9369,9376 ---- 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); topal-81/pine-4.53.patch 0000644 0001750 0001750 00000017166 14231232503 013104 0 ustar pjb pjb Only in pine4.53: .bld.hlp Only in pine4.53: bin diff -cr OP/pine4.53/imap/src/c-client/mail.h pine4.53/imap/src/c-client/mail.h *** OP/pine4.53/imap/src/c-client/mail.h Tue Jan 7 20:33:50 2003 --- pine4.53/imap/src/c-client/mail.h Sat Feb 15 19:04:55 2003 *************** *** 655,660 **** --- 655,661 ---- unsigned long bytes; /* size of text in octets */ } size; char *md5; /* MD5 checksum */ + unsigned short topal_hack; /* set to 1 if topal has wrecked the sending */ }; Only in pine4.53/pine: date.c diff -cr OP/pine4.53/pine/pine.h pine4.53/pine/pine.h *** OP/pine4.53/pine/pine.h Fri Jan 10 23:25:55 2003 --- pine4.53/pine/pine.h Sat Feb 15 19:06:14 2003 *************** *** 63,69 **** #ifndef _PINE_INCLUDED #define _PINE_INCLUDED ! #define PINE_VERSION "4.53" #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.53T" #define PHONE_HOME_VERSION "-count" #define PHONE_HOME_HOST "docserver.cac.washington.edu" diff -cr OP/pine4.53/pine/send.c pine4.53/pine/send.c *** OP/pine4.53/pine/send.c Tue Jan 14 21:22:59 2003 --- pine4.53/pine/send.c Sat Feb 15 19:04:55 2003 *************** *** 4881,4886 **** --- 4881,4896 ---- 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")); } *************** *** 6193,6205 **** ; rfc822_parse_content_header(nb,ucase(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; --- 6203,6215 ---- ; rfc822_parse_content_header(nb,ucase(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; *************** *** 6207,6212 **** --- 6217,6224 ---- 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); *************** *** 8721,8737 **** 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. --- 8733,8751 ---- 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. *************** *** 8901,8907 **** 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) --- 8915,8922 ---- 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) *************** *** 8961,8967 **** * Convert text pieces to canonical form * BEFORE applying any encoding (rfc1341: appendix G)... */ ! if(body->type == TYPETEXT){ gf_link_filter(gf_local_nvtnl, NULL); } --- 8976,8983 ---- * Convert text pieces to canonical form * BEFORE applying any encoding (rfc1341: appendix G)... */ ! if(body->type == TYPETEXT ! | (body->type == TYPEMULTIPART && body->topal_hack == 1)){ gf_link_filter(gf_local_nvtnl, NULL); } *************** *** 9070,9084 **** ? 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)); --- 9086,9112 ---- ? 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)); *************** *** 9336,9342 **** 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); --- 9364,9371 ---- 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); topal-81/pine-4.58.patch 0000644 0001750 0001750 00000017103 14231232503 013100 0 ustar pjb pjb diff -cr OP/pine4.58/imap/src/c-client/mail.h NP/pine4.58/imap/src/c-client/mail.h *** OP/pine4.58/imap/src/c-client/mail.h Tue Aug 19 22:46:41 2003 --- NP/pine4.58/imap/src/c-client/mail.h Fri Sep 19 10:02:18 2003 *************** *** 678,683 **** --- 678,684 ---- } 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 */ }; diff -cr OP/pine4.58/pine/pine.h NP/pine4.58/pine/pine.h *** OP/pine4.58/pine/pine.h Tue Sep 9 22:52:38 2003 --- NP/pine4.58/pine/pine.h Fri Sep 19 10:02:18 2003 *************** *** 63,69 **** #ifndef _PINE_INCLUDED #define _PINE_INCLUDED ! #define PINE_VERSION "4.58" #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.58T" #define PHONE_HOME_VERSION "-count" #define PHONE_HOME_HOST "docserver.cac.washington.edu" diff -cr OP/pine4.58/pine/send.c NP/pine4.58/pine/send.c *** OP/pine4.58/pine/send.c Fri Aug 29 23:03:08 2003 --- NP/pine4.58/pine/send.c Fri Sep 19 10:02:18 2003 *************** *** 5094,5099 **** --- 5094,5109 ---- 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")); } *************** *** 6440,6452 **** ; rfc822_parse_content_header(nb,ucase(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; --- 6450,6462 ---- ; rfc822_parse_content_header(nb,ucase(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; *************** *** 6454,6459 **** --- 6464,6471 ---- 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); *************** *** 9032,9048 **** 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. --- 9044,9062 ---- 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. *************** *** 9212,9218 **** 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) --- 9226,9233 ---- 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) *************** *** 9272,9278 **** * Convert text pieces to canonical form * BEFORE applying any encoding (rfc1341: appendix G)... */ ! if(body->type == TYPETEXT){ gf_link_filter(gf_local_nvtnl, NULL); } --- 9287,9294 ---- * Convert text pieces to canonical form * BEFORE applying any encoding (rfc1341: appendix G)... */ ! if(body->type == TYPETEXT ! | (body->type == TYPEMULTIPART && body->topal_hack == 1)){ gf_link_filter(gf_local_nvtnl, NULL); } *************** *** 9372,9386 **** ? 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)); --- 9388,9414 ---- ? 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)); *************** *** 9611,9617 **** 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); --- 9639,9646 ---- 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); topal-81/pine-4.60.patch 0000644 0001750 0001750 00000017356 14231232503 013103 0 ustar pjb pjb 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); topal-81/pine-4.64.patch 0000644 0001750 0001750 00000017433 14231232503 013103 0 ustar pjb pjb diff -cr OP/pine4.64/imap/src/c-client/mail.h NP/pine4.64/imap/src/c-client/mail.h *** OP/pine4.64/imap/src/c-client/mail.h 2005-02-08 23:44:54.000000000 +0000 --- NP/pine4.64/imap/src/c-client/mail.h 2007-12-28 15:30:39.000000000 +0000 *************** *** 713,718 **** --- 713,719 ---- } 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 */ }; diff -cr OP/pine4.64/pine/pine.h NP/pine4.64/pine/pine.h *** OP/pine4.64/pine/pine.h 2005-09-16 01:39:42.000000000 +0100 --- NP/pine4.64/pine/pine.h 2007-12-28 15:32:00.000000000 +0000 *************** *** 63,69 **** #ifndef _PINE_INCLUDED #define _PINE_INCLUDED ! #define PINE_VERSION "4.64" #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.64T" #define PHONE_HOME_VERSION "-count" #define PHONE_HOME_HOST "docserver.cac.washington.edu" diff -cr OP/pine4.64/pine/send.c NP/pine4.64/pine/send.c *** OP/pine4.64/pine/send.c 2005-09-12 23:04:25.000000000 +0100 --- NP/pine4.64/pine/send.c 2007-12-28 15:34:58.000000000 +0000 *************** *** 5254,5259 **** --- 5254,5269 ---- 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")); } *************** *** 6752,6764 **** 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; --- 6762,6774 ---- 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; *************** *** 6766,6771 **** --- 6776,6783 ---- 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); *************** *** 9411,9427 **** 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 (),(long) time (0), ! (long) 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. --- 9423,9441 ---- 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 (),(long) time (0), ! (long) 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. *************** *** 9592,9598 **** 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) --- 9606,9613 ---- 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) *************** *** 9652,9658 **** * 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); } --- 9667,9674 ---- * 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); } *************** *** 9752,9766 **** ? 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)); --- 9768,9794 ---- ? 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)); *************** *** 9991,9997 **** 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); --- 10019,10026 ---- 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); topal-81/alpine-1.00.patch 0000644 0001750 0001750 00000042457 14231232503 013407 0 ustar pjb pjb diff -cr alpine-1.00.orig/alpine/send.c alpine-1.00.new/alpine/send.c *** alpine-1.00.orig/alpine/send.c 2007-12-05 17:50:54.000000000 +0000 --- alpine-1.00.new/alpine/send.c 2008-01-07 15:19:45.000000000 +0000 *************** *** 4025,4030 **** --- 4025,4047 ---- pbf = save_previous_pbuf; g_rolenick = NULL; + /* Topal: Unmangle the body types. */ + if ((*body)->type == TYPEMULTIPART + && (*body)->topal_hack == 1) { + /* This was a single part message which Topal mangled. */ + dprint((9, "Topal: unmangling single part message\n")); + (*body)->type = TYPETEXT; + } + if ((*body)->type == TYPEMULTIPART + && (*body)->topal_hack != 1 + && (*body)->nested.part->body.type == TYPEMULTIPART + && (*body)->nested.part->body.topal_hack == 1) { + /* Topal mangled a multipart message. So the first nested part + is really TYPETEXT. */ + dprint((9, "Topal: unmangling first part of multipart message\n")); + (*body)->nested.part->body.type = TYPETEXT; + } + dprint((4, "=== send returning ===\n")); } *************** *** 5265,5286 **** 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; ! mail_free_body_parameter(&b->parameter); b->parameter = nb->parameter; nb->parameter = NULL; mail_free_body_parameter(&nb->parameter); } ! mail_free_body(&nb); } --- 5282,5331 ---- rfc822_parse_content_header(nb, (char *) ucase((unsigned char *) buf+8),s); + /* Topal: We're working on the first + text segment of the message. If + the filter returns something that + isn't TYPETEXT, then we need to + pretend (later on) that this is in + fact a TYPETEXT, because Topal has + already encoded it.... + + Original code path first, then an + alternate path. + */ 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; ! ! mail_free_body_parameter(&b->parameter); ! b->parameter = nb->parameter; ! nb->parameter = NULL; ! mail_free_body_parameter(&nb->parameter); ! } ! else if(F_ON(F_ENABLE_TOPAL_HACK, ps_global)){ ! /* Perhaps the type isn't TYPETEXT, ! and the hack is requested. So, ! let's mess with the types. */ ! if(nb->type != TYPETEXT){ ! b->type = nb->type; b->subtype = nb->subtype; nb->subtype = NULL; ! ! dprint((9, "Topal: mangling body!\n")); mail_free_body_parameter(&b->parameter); b->parameter = nb->parameter; nb->parameter = NULL; mail_free_body_parameter(&nb->parameter); + b->topal_hack = 1; + } } ! /* Topal: end */ mail_free_body(&nb); } Only in alpine-1.00.new/imap: ip6 diff -cr alpine-1.00.orig/imap/src/c-client/mail.h alpine-1.00.new/imap/src/c-client/mail.h *** alpine-1.00.orig/imap/src/c-client/mail.h 2007-11-19 23:32:35.000000000 +0000 --- alpine-1.00.new/imap/src/c-client/mail.h 2008-01-07 12:54:20.000000000 +0000 *************** *** 775,780 **** --- 775,781 ---- unsigned long bytes; /* size of text in octets */ } size; char *md5; /* MD5 checksum */ + unsigned short topal_hack; /* set to 1 if topal has wrecked the sending */ void *sparep; /* spare pointer reserved for main program */ }; diff -cr alpine-1.00.orig/pith/conf.c alpine-1.00.new/pith/conf.c *** alpine-1.00.orig/pith/conf.c 2007-12-13 19:31:13.000000000 +0000 --- alpine-1.00.new/pith/conf.c 2008-01-07 14:00:58.000000000 +0000 *************** *** 2778,2783 **** --- 2778,2785 ---- F_SEND_WO_CONFIRM, h_config_send_wo_confirm, PREF_SEND, 0}, {"strip-whitespace-before-send", "Strip Whitespace Before Sending", F_STRIP_WS_BEFORE_SEND, h_config_strip_ws_before_send, PREF_SEND, 0}, + {"enable-topal-hack", "Enable Topal hack for OpenPGP/MIME messages", + F_ENABLE_TOPAL_HACK, h_config_enable_topal_hack, PREF_HIDDEN, 0}, {"warn-if-blank-subject", "Warn if Blank Subject", F_WARN_ABOUT_NO_SUBJECT, h_config_warn_if_subj_blank, PREF_SEND, 0}, {"warn-if-blank-to-and-cc-and-newsgroups", "Warn if Blank To and CC and Newsgroups", diff -cr alpine-1.00.orig/pith/conftype.h alpine-1.00.new/pith/conftype.h *** alpine-1.00.orig/pith/conftype.h 2007-11-08 01:14:02.000000000 +0000 --- alpine-1.00.new/pith/conftype.h 2008-01-07 12:50:47.000000000 +0000 *************** *** 487,492 **** --- 487,493 ---- F_MARK_FCC_SEEN, F_MULNEWSRC_HOSTNAMES_AS_TYPED, F_STRIP_WS_BEFORE_SEND, + F_ENABLE_TOPAL_HACK, F_QUELL_FLOWED_TEXT, F_COMPOSE_ALWAYS_DOWNGRADE, F_SORT_DEFAULT_FCC_ALPHA, diff -cr alpine-1.00.orig/pith/pine.hlp alpine-1.00.new/pith/pine.hlp *** alpine-1.00.orig/pith/pine.hlp 2007-12-20 16:34:31.000000000 +0000 --- alpine-1.00.new/pith/pine.hlp 2008-01-07 12:47:42.000000000 +0000 *************** *** 3023,3028 **** --- 3023,3029 ----