none
How do i distinguish a signed and an encrypted email without retrieving its details? RRS feed

  • Question

  • We are synchronizing the contents of a mail folder using SyncFolderItems.

    How can we distinguish between a signed and an encrypted message?

    Checking the item class for "IPM.Note.SMIME.MultipartSigned" works for regular signed messages, but if the signed message has an attachment it has "IPM.Note.SMIME" as item class. Only after downloading the smime attachment and analyzing its content i can say that it is signed and has an pdf attached for example.

    Are there any flags i could query with SyncFolderItems that allow me to find that out?

    Wednesday, November 1, 2017 4:34 PM

All replies

  • No encryption is left up to the client so unless the client has actually set its own custom properties to tell you this the server doesn't really care at that level it just another item to Exchange whether it encrypted signed or other  I would suggest you check the TransportHeader or MIMEskeleton https://msdn.microsoft.com/en-us/library/office/hh545614(v=exchg.140).aspx as maybe what your after is disclosed here.

    Cheers
    Glen

    Wednesday, November 1, 2017 11:32 PM
  • Retrieving the headers did not result in a usable field
    (via <typ:ExtendedFieldURI PropertyTag="0x7D" PropertyType="String"/>)

    When i use MFCMAPI there is a content-type property and it seems that i can retrieve it using  <typ:ExtendedFieldURI PropertySetId="00020386-0000-0000-C000-000000000046" PropertyName="content-type" PropertyType="String" />

    I have the following test emails:

    1. signed: ItemClass: IPM.Note.SMIME.MultipartSigned,  Content-Type not set
    2. encrypted: ItemClass: IPM.Note.SMIME, Content-Type: enveloped-data
    3. signed and encrypted: ItemClass: IPM.Note.SMIME, Content-Type: enveloped-data
    4. signed with attachment: ItemClass: IPM.Note.SMIME.MultipartSigned,  Content-Type: not set
    5. Another signed with attachment: ItemClass: IPM.Note.SMIME , Content-Type: signed-data

    So maybe a combination of itemclass and content-type could result in a view that at least shows the signed/encrypted status correctly. I don't seem to find a flag that indicates that a signed mail also has a file attachment like a pdf.



    • Edited by Simon Hain Thursday, November 2, 2017 11:49 AM
    Thursday, November 2, 2017 11:46 AM