git://git.exim.org
/
users
/
jgh
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
898d150
)
Allow for linefold when generating more than one RFC 2047 encoded-word.
author
Philip Hazel
<ph10@hermes.cam.ac.uk>
Wed, 8 Mar 2006 11:13:07 +0000
(11:13 +0000)
committer
Philip Hazel
<ph10@hermes.cam.ac.uk>
Wed, 8 Mar 2006 11:13:07 +0000
(11:13 +0000)
Sieve uses this.
doc/doc-txt/ChangeLog
patch
|
blob
|
history
src/src/expand.c
patch
|
blob
|
history
src/src/functions.h
patch
|
blob
|
history
src/src/parse.c
patch
|
blob
|
history
src/src/sieve.c
patch
|
blob
|
history
diff --git
a/doc/doc-txt/ChangeLog
b/doc/doc-txt/ChangeLog
index 632e11189c19d59399c562119713640403b1d110..29875590e5b835620bb86d737310e024d280bb0f 100644
(file)
--- a/
doc/doc-txt/ChangeLog
+++ b/
doc/doc-txt/ChangeLog
@@
-1,4
+1,4
@@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.32
5 2006/03/08 10:49:18
ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.32
6 2006/03/08 11:13:07
ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
Change log file for Exim from version 4.21
-------------------------------------------
@@
-296,6
+296,10
@@
PH/57 Tidies in SMTP dialogue display in debug output: (i) It was not showing
challenges; (ii) I've removed the CR characters from the debug output for
SMTP output lines.
challenges; (ii) I've removed the CR characters from the debug output for
SMTP output lines.
+PH/58 Allow for the insertion of a newline as well as a space when a string
+ is turned into more than one encoded-word during RFC 2047 encoding. The
+ Sieve code now uses this.
+
Exim version 4.60
-----------------
Exim version 4.60
-----------------
diff --git
a/src/src/expand.c
b/src/src/expand.c
index 5d63cb1913ab688ddfb93cdbcbd8e8a643cca4d4..3b50363452da9e7307fb561d13fab0cf3f0c8e45 100644
(file)
--- a/
src/src/expand.c
+++ b/
src/src/expand.c
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/expand.c,v 1.5
6 2006/03/01 11:40:51
ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.5
7 2006/03/08 11:13:07
ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-4737,7
+4737,7
@@
while (*s != 0)
{
uschar buffer[2048];
uschar *string = parse_quote_2047(sub, Ustrlen(sub), headers_charset,
{
uschar buffer[2048];
uschar *string = parse_quote_2047(sub, Ustrlen(sub), headers_charset,
- buffer, sizeof(buffer));
+ buffer, sizeof(buffer)
, FALSE
);
yield = string_cat(yield, &size, &ptr, string, Ustrlen(string));
continue;
}
yield = string_cat(yield, &size, &ptr, string, Ustrlen(string));
continue;
}
diff --git
a/src/src/functions.h
b/src/src/functions.h
index 9b8bfacf2021330d1f720ee3fac5b74fa8fea343..2728d79f13f62a3e79d442b0075e8c07173b0662 100644
(file)
--- a/
src/src/functions.h
+++ b/
src/src/functions.h
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/functions.h,v 1.2
3 2006/02/28 11:25:40
ph10 Exp $ */
+/* $Cambridge: exim/src/src/functions.h,v 1.2
4 2006/03/08 11:13:07
ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-176,7
+176,7
@@
extern uschar *parse_find_address_end(uschar *, BOOL);
extern uschar *parse_find_at(uschar *);
extern uschar *parse_fix_phrase(uschar *, int, uschar *, int);
extern uschar *parse_message_id(uschar *, uschar **, uschar **);
extern uschar *parse_find_at(uschar *);
extern uschar *parse_fix_phrase(uschar *, int, uschar *, int);
extern uschar *parse_message_id(uschar *, uschar **, uschar **);
-extern uschar *parse_quote_2047(uschar *, int, uschar *, uschar *, int);
+extern uschar *parse_quote_2047(uschar *, int, uschar *, uschar *, int
, BOOL
);
extern BOOL queue_action(uschar *, int, uschar **, int, int);
extern void queue_check_only(void);
extern BOOL queue_action(uschar *, int, uschar **, int, int);
extern void queue_check_only(void);
diff --git
a/src/src/parse.c
b/src/src/parse.c
index 182df8026cdce1d6b5f298fbe6f0bd0845530ddb..a0366431e2a07e7fc8ce77852c1be012ad094217 100644
(file)
--- a/
src/src/parse.c
+++ b/
src/src/parse.c
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/parse.c,v 1.
8 2006/02/28 11:25:40
ph10 Exp $ */
+/* $Cambridge: exim/src/src/parse.c,v 1.
9 2006/03/08 11:13:07
ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-854,6
+854,8
@@
Arguments:
charset the name of the character set; NULL => iso-8859-1
buffer the buffer to put the answer in
buffer_size the size of the buffer
charset the name of the character set; NULL => iso-8859-1
buffer the buffer to put the answer in
buffer_size the size of the buffer
+ fold if TRUE, a newline is inserted before the separating space when
+ more than one encoded-word is generated
Returns: pointer to the original string, if no quoting needed, or
pointer to buffer containing the quoted string, or
Returns: pointer to the original string, if no quoting needed, or
pointer to buffer containing the quoted string, or
@@
-863,7
+865,7
@@
Returns: pointer to the original string, if no quoting needed, or
uschar *
parse_quote_2047(uschar *string, int len, uschar *charset, uschar *buffer,
uschar *
parse_quote_2047(uschar *string, int len, uschar *charset, uschar *buffer,
- int buffer_size)
+ int buffer_size
, BOOL fold
)
{
uschar *s = string;
uschar *p, *t;
{
uschar *s = string;
uschar *p, *t;
@@
-890,6
+892,7
@@
for (; len > 0; len--)
{
*t++ = '?';
*t++ = '=';
{
*t++ = '?';
*t++ = '=';
+ if (fold) *t++ = '\n';
*t++ = ' ';
p = t;
Ustrncpy(p, buffer, hlen);
*t++ = ' ';
p = t;
Ustrncpy(p, buffer, hlen);
@@
-989,7
+992,7
@@
for (i = 0, s = phrase; i < len; i++, s++)
if ((*s < 32 && *s != '\t') || *s > 126) break;
if (i < len) return parse_quote_2047(phrase, len, headers_charset, buffer,
if ((*s < 32 && *s != '\t') || *s > 126) break;
if (i < len) return parse_quote_2047(phrase, len, headers_charset, buffer,
- buffer_size);
+ buffer_size
, FALSE
);
/* No non-printers; use the RFC 822 quoting rules */
/* No non-printers; use the RFC 822 quoting rules */
diff --git
a/src/src/sieve.c
b/src/src/sieve.c
index 8b89a0ea9124660138c901c8f8838f42ca50617f..3b0199d49903e5be99f26944b8b8f2aaf6652f7d 100644
(file)
--- a/
src/src/sieve.c
+++ b/
src/src/sieve.c
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/sieve.c,v 1.1
8 2006/03/01 10:40:03
ph10 Exp $ */
+/* $Cambridge: exim/src/src/sieve.c,v 1.1
9 2006/03/08 11:13:07
ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-2854,7
+2854,7
@@
while (*filter->pc)
/* Allocation is larger than neccessary, but enough even for split MIME words */
buffer_capacity=32+4*subject.length;
buffer=store_get(buffer_capacity);
/* Allocation is larger than neccessary, but enough even for split MIME words */
buffer_capacity=32+4*subject.length;
buffer=store_get(buffer_capacity);
- addr->reply->subject=parse_quote_2047(subject.character, subject.length, US"utf-8", buffer, buffer_capacity);
+ addr->reply->subject=parse_quote_2047(subject.character, subject.length, US"utf-8", buffer, buffer_capacity
, TRUE
);
addr->reply->oncelog=once;
addr->reply->once_repeat=days*86400;
addr->reply->oncelog=once;
addr->reply->once_repeat=days*86400;