summaryrefslogtreecommitdiffstats
path: root/rfc2045/reformime.c
diff options
context:
space:
mode:
authorSam Varshavchik2018-07-31 19:48:03 -0400
committerSam Varshavchik2018-07-31 19:48:03 -0400
commit9176dd6905f7bf273be6008b8824eb9e8443617a (patch)
treeb39a33972971b4f9e79a5ec5fcf3573c4a4e50d3 /rfc2045/reformime.c
parent83fb87d6a76d7b192e877aa827731b3a589fd41a (diff)
downloadcourier-libs-9176dd6905f7bf273be6008b8824eb9e8443617a.tar.bz2
Recognize utf-8 address type when parsing DSNs.
Diffstat (limited to 'rfc2045/reformime.c')
-rw-r--r--rfc2045/reformime.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/rfc2045/reformime.c b/rfc2045/reformime.c
index e293bc5..8bdfa6c 100644
--- a/rfc2045/reformime.c
+++ b/rfc2045/reformime.c
@@ -1,5 +1,5 @@
/*
-** Copyright 1998 - 2011 Double Precision, Inc. See COPYING for
+** Copyright 1998 - 2018 Double Precision, Inc. See COPYING for
** distribution information.
*/
@@ -695,7 +695,8 @@ char *p, *q;
for (p=addr; *p && isspace((int)(unsigned char)*p); ++p)
;
- if (strncasecmp(p, "rfc822;", 7))
+ if (strncasecmp(p, "rfc822;", 7) &&
+ strncasecmp(p, "utf-8;", 6))
{
free(action);
free(addr);
@@ -703,7 +704,8 @@ char *p, *q;
}
for (q=action; *q && isspace((int)(unsigned char)*q); ++q)
;
- p += 7;
+
+ p=strchr(p, ';')+1;
while (*p && isspace((int)(unsigned char)*p))
++p;
printf("%s %s\n", q, p);
@@ -738,7 +740,7 @@ char *orecip;
rfc2045_mimeinfo(p, &content_type_s, &content_transfer_encoding_s,
&charset_s);
rfc2045_mimepos(p, &start_pos, &end_pos, &start_body, &dummy, &dummy);
- if (strcasecmp(content_type_s, "message/delivery-status") ||
+ if (!rfc2045_delivery_status_content_type(content_type_s) ||
fseek(stdin, start_body, SEEK_SET) == -1)
_exit(1);