# HG changeset patch # User Igor Stroh # Date 1450350224 -3600 # Node ID 09dd5299d91c49da6cf6490eb87e34d9aa455d1a # Parent 602869b958a33ba004b7fcb2c7fa4cc8e75aa20c Added Content-ID header support diff -r 602869b958a3 -r 09dd5299d91c src/libpst.c --- a/src/libpst.c Fri Sep 11 13:16:09 2015 -0700 +++ b/src/libpst.c Thu Dec 17 12:03:44 2015 +0100 @@ -2646,6 +2646,11 @@ NULL_CHECK(attach); LIST_COPY_INT32("Attachment Mime Sequence", attach->sequence); break; + case 0x3712: // PR_ATTACH_CONTENT_ID + // content identification header (Content-ID) + NULL_CHECK(attach); + LIST_COPY_STR("Content ID", attach->content_id); + break; case 0x3A00: // PR_ACCOUNT LIST_COPY_CONTACT_STR("Contact's Account name", item->contact->account_name); break; diff -r 602869b958a3 -r 09dd5299d91c src/libpst.h --- a/src/libpst.h Fri Sep 11 13:16:09 2015 -0700 +++ b/src/libpst.h Thu Dec 17 12:03:44 2015 +0100 @@ -606,6 +606,8 @@ pst_string filename2; /** mapi element 0x370e PR_ATTACH_MIME_TAG */ pst_string mimetype; + /** mapi element 0x3712 PR_ATTACH_CONTENT_ID */ + pst_string content_id; /** mapi element 0x3701 PR_ATTACH_DATA_OBJ */ pst_binary data; /** only used if the attachment is by reference, in which case this is the id2 reference */ diff -r 602869b958a3 -r 09dd5299d91c src/readpst.c --- a/src/readpst.c Fri Sep 11 13:16:09 2015 -0700 +++ b/src/readpst.c Thu Dec 17 12:03:44 2015 +0100 @@ -1190,6 +1190,10 @@ } fprintf(f_output, "Content-Transfer-Encoding: base64\n"); + if (attach->content_id.str) { + fprintf(f_output, "Content-ID: %s\n", attach->content_id.str); + } + if (attach->filename2.str) { // use the long filename, converted to proper encoding if needed. // it is already utf8