1
diff -cr OP/pine4.64/imap/src/c-client/mail.h NP/pine4.64/imap/src/c-client/mail.h
2
*** OP/pine4.64/imap/src/c-client/mail.h 2005-02-08 23:44:54.000000000 +0000
3
--- NP/pine4.64/imap/src/c-client/mail.h 2007-12-28 15:30:39.000000000 +0000
8
char *md5; /* MD5 checksum */
9
void *sparep; /* spare pointer reserved for main program */
10
+ unsigned short topal_hack; /* set to 1 if topal has wrecked the sending */
14
diff -cr OP/pine4.64/pine/pine.h NP/pine4.64/pine/pine.h
15
*** OP/pine4.64/pine/pine.h 2005-09-16 01:39:42.000000000 +0100
16
--- NP/pine4.64/pine/pine.h 2007-12-28 15:32:00.000000000 +0000
19
#ifndef _PINE_INCLUDED
20
#define _PINE_INCLUDED
22
! #define PINE_VERSION "4.64"
23
#define PHONE_HOME_VERSION "-count"
24
#define PHONE_HOME_HOST "docserver.cac.washington.edu"
27
#ifndef _PINE_INCLUDED
28
#define _PINE_INCLUDED
30
! #define PINE_VERSION "4.64T"
31
#define PHONE_HOME_VERSION "-count"
32
#define PHONE_HOME_HOST "docserver.cac.washington.edu"
34
diff -cr OP/pine4.64/pine/send.c NP/pine4.64/pine/send.c
35
*** OP/pine4.64/pine/send.c 2005-09-12 23:04:25.000000000 +0100
36
--- NP/pine4.64/pine/send.c 2007-12-28 15:34:58.000000000 +0000
40
pbf = save_previous_pbuf;
43
+ if ((*body)->type == TYPEMULTIPART
44
+ && (*body)->topal_hack == 1)
45
+ /* This was a single part message which Topal mangled. */
46
+ (*body)->type = TYPETEXT;
47
+ if ((*body)->type == TYPEMULTIPART
48
+ && (*body)->topal_hack != 1)
49
+ /* Topal mangled a multipart message. So the first nested part
50
+ is really TYPETEXT. */
51
+ (*body)->nested.part->body.type = TYPETEXT;
53
dprint(4, (debugfile, "=== send returning ===\n"));
59
rfc822_parse_content_header(nb,
60
(char *) ucase((unsigned char *) buf+8),s);
61
! if(nb->type == TYPETEXT
64
|| strucmp(b->subtype, nb->subtype))){
66
fs_give((void **) &b->subtype);
68
b->subtype = nb->subtype;
73
rfc822_parse_content_header(nb,
74
(char *) ucase((unsigned char *) buf+8),s);
77
|| strucmp(b->subtype, nb->subtype))){
79
fs_give((void **) &b->subtype);
82
b->subtype = nb->subtype;
88
b->parameter = nb->parameter;
90
mail_free_body_parameter(&nb->parameter);
91
+ if (b->type != TYPETEXT)
98
dprint(4, (debugfile, "-- pine_encode_body: %d\n", body ? body->type : 0));
99
if (body) switch (body->type) {
100
case TYPEMULTIPART: /* multi-part */
101
! if (!body->parameter) { /* cookie not set up yet? */
102
! char tmp[MAILTMPLEN]; /* make cookie not in BASE64 or QUOTEPRINT*/
103
! sprintf (tmp,"%ld-%ld-%ld=:%ld",gethostid (),random (),(long) time (0),
105
! body->parameter = mail_newbody_parameter ();
106
! body->parameter->attribute = cpystr ("BOUNDARY");
107
! body->parameter->value = cpystr (tmp);
109
! part = body->nested.part; /* encode body parts */
110
! do pine_encode_body (&part->body);
111
! while (part = part->next); /* until done */
113
/* case MESSAGE: */ /* here for documentation */
114
/* Encapsulated messages are always treated as text objects at this point.
116
dprint(4, (debugfile, "-- pine_encode_body: %d\n", body ? body->type : 0));
117
if (body) switch (body->type) {
118
case TYPEMULTIPART: /* multi-part */
119
! if (body->topal_hack != 1){
120
! if (!body->parameter) { /* cookie not set up yet? */
121
! char tmp[MAILTMPLEN]; /* make cookie not in BASE64 or QUOTEPRINT*/
122
! sprintf (tmp,"%ld-%ld-%ld=:%ld",gethostid (),random (),(long) time (0),
124
! body->parameter = mail_newbody_parameter ();
125
! body->parameter->attribute = cpystr ("BOUNDARY");
126
! body->parameter->value = cpystr (tmp);
128
! part = body->nested.part; /* encode body parts */
129
! do pine_encode_body (&part->body);
130
! while (part = part->next); /* until done */
133
/* case MESSAGE: */ /* here for documentation */
134
/* Encapsulated messages are always treated as text objects at this point.
138
dprint(4, (debugfile, "-- pine_rfc822_output_body: %d\n",
139
body ? body->type : 0));
140
! if(body->type == TYPEMULTIPART) { /* multipart gets special handling */
141
part = body->nested.part; /* first body part */
143
for (param = body->parameter; param && !cookie; param = param->next)
146
dprint(4, (debugfile, "-- pine_rfc822_output_body: %d\n",
147
body ? body->type : 0));
148
! if(body->type == TYPEMULTIPART
149
! && body->topal_hack != 1) { /* multipart gets special handling */
150
part = body->nested.part; /* first body part */
152
for (param = body->parameter; param && !cookie; param = param->next)
155
* Convert text pieces to canonical form
156
* BEFORE applying any encoding (rfc1341: appendix G)...
158
! if(body->type == TYPETEXT && body->encoding != ENCBASE64){
159
gf_link_filter(gf_local_nvtnl, NULL);
163
* Convert text pieces to canonical form
164
* BEFORE applying any encoding (rfc1341: appendix G)...
166
! if((body->type == TYPETEXT && body->encoding != ENCBASE64)
167
! | (body->type == TYPEMULTIPART && body->topal_hack == 1)){
168
gf_link_filter(gf_local_nvtnl, NULL);
174
: rfc822_default_subtype (body->type))))
175
return(pwbh_finish(0, so));
179
! if(!(so_puts(so, "; ")
180
! && rfc2231_output(so, param->attribute, param->value,
181
! (char *) tspecials,
182
! ps_global->VAR_CHAR_SET)))
183
! return(pwbh_finish(0, so));
184
! while (param = param->next);
186
else if(!so_puts(so, "; CHARSET=US-ASCII"))
187
return(pwbh_finish(0, so));
190
: rfc822_default_subtype (body->type))))
191
return(pwbh_finish(0, so));
195
! if(body->topal_hack == 1
196
! && !struncmp(param->attribute, "protocol", 9))
198
! if(!(so_puts(so, "; \015\012\011")
199
! && rfc2231_output(so, param->attribute, param->value,
200
! (char *) tspecials,
201
! ps_global->VAR_CHAR_SET)))
202
! return(pwbh_finish(0, so));
206
! if(!(so_puts(so, "; ")
207
! && rfc2231_output(so, param->attribute, param->value,
208
! (char *) tspecials,
209
! ps_global->VAR_CHAR_SET)))
210
! return(pwbh_finish(0, so));
212
! while (param = param->next);
214
else if(!so_puts(so, "; CHARSET=US-ASCII"))
215
return(pwbh_finish(0, so));
221
! if(body->type == TYPEMULTIPART) { /* multipart gets special handling */
222
part = body->nested.part; /* first body part */
223
do /* for each part */
224
l += send_body_size(&part->body);
229
! if(body->type == TYPEMULTIPART
230
! && body->topal_hack != 1) { /* multipart gets special handling */
231
part = body->nested.part; /* first body part */
232
do /* for each part */
233
l += send_body_size(&part->body);