diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2007-01-31 11:30:08 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2007-01-31 11:30:08 +0000 |
commit | 9c57cbc06f4506e05f63190afddfc9b3648813cb (patch) | |
tree | 6b3a6a52762ceaa63b710a50cc94c91eb3dffd5f /src | |
parent | 41c7c167f4d3552804bfaf7278d72fc448b851ff (diff) |
Add ${rfc2047d: expansion.
Diffstat (limited to 'src')
-rw-r--r-- | src/ACKNOWLEDGMENTS | 7 | ||||
-rw-r--r-- | src/src/expand.c | 21 |
2 files changed, 24 insertions, 4 deletions
diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS index 23a6de7ff..a855be12c 100644 --- a/src/ACKNOWLEDGMENTS +++ b/src/ACKNOWLEDGMENTS @@ -1,4 +1,4 @@ -$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.69 2007/01/30 15:10:59 ph10 Exp $ +$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.70 2007/01/31 11:30:08 ph10 Exp $ EXIM ACKNOWLEDGEMENTS @@ -20,7 +20,7 @@ relatively small patches. Philip Hazel Lists created: 20 November 2002 -Last updated: 30 January 2007 +Last updated: 31 January 2007 THE OLD LIST @@ -167,7 +167,8 @@ Jakob Hirsch Patch for % operator Magnus Holmgren Patch for filter_prepend_home Patch for "h" flag in Domain Keys Patch for $sending_ip_address/$sending_port - Lots of other support + Patch for ${rfc2047d: + Lots of other maintenance support Kjetil Torgrim Homme Patch for require_files problem on NFS file systems Tom Hughes Suggested patch for $n bug in pipe command from filter Pierre Humblet Continued Cygwin support diff --git a/src/src/expand.c b/src/src/expand.c index a9b474939..b2674dd42 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/expand.c,v 1.78 2007/01/30 15:10:59 ph10 Exp $ */ +/* $Cambridge: exim/src/src/expand.c,v 1.79 2007/01/31 11:30:08 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -181,6 +181,7 @@ static uschar *op_table_main[] = { US"nhash", US"quote", US"rfc2047", + US"rfc2047d", US"rxquote", US"s", US"sha1", @@ -211,6 +212,7 @@ enum { EOP_NHASH, EOP_QUOTE, EOP_RFC2047, + EOP_RFC2047D, EOP_RXQUOTE, EOP_S, EOP_SHA1, @@ -5084,6 +5086,23 @@ while (*s != 0) continue; } + /* RFC 2047 decode */ + + case EOP_RFC2047D: + { + int len; + uschar *error; + uschar *decoded = rfc2047_decode(sub, check_rfc2047_length, + headers_charset, '?', &len, &error); + if (error != NULL) + { + expand_string_message = error; + goto EXPAND_FAILED; + } + yield = string_cat(yield, &size, &ptr, decoded, len); + continue; + } + /* from_utf8 converts UTF-8 to 8859-1, turning non-existent chars into underscores */ |