Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converting winmail.dat tnef mapi calender invitation to .ics file #115

Open
pasikarkkainen opened this issue Feb 3, 2021 · 3 comments
Open

Comments

@pasikarkkainen
Copy link

pasikarkkainen commented Feb 3, 2021

First of all thanks a lot for tnefparse, it rocks! It seems to be the only opensource util/library that has so far managed to parse this winmail.dat file I have here..

My question is: are there any plans to support generating .ics files from winmail.dat MAPI calender invitations? For example MS Exchange 2010 seems to send such winmail.dat files (and some organizations still seem to use such an old servers..). Based on some googling newer Exchange servers and/or Outlook clients might send such winmail.dat invitations aswell.

If I understand correctly such winmail.dat file does not include any real .ics attachments but instead the calender invitation is included in the MAPI fields/objects/properties.. like this:

$ tnefparse -o winmail.dat  -b

Overview of winmail.dat:

  Attachments:


  Objects:

    TNEF Version
    OEM Codepage
    Message ID
    Priority
    Date Sent
    Date Modified
    Message Class
    Subject
    Date Start
    Date End
    Owner Appointment ID
    Response Requested
    MAPI Properties

  Properties:

    MAPI_TNEF_CORRELATION_KEY
    MAPI_SENT_REPRESENTING_NAME
    MAPI_SENT_REPRESENTING_EMAIL_ADDRESS
    MAPI_SENT_REPRESENTING_ADDRTYPE
    MAPI_SENT_REPRESENTING_ENTRYID
    MAPI_SENT_REPRESENTING_SMTP_ADDRESS
    MAPI_SIP_ADDRESS
    MAPI_SENDER_NAME
    MAPI_SENDER_EMAIL_ADDRESS
    MAPI_SENDER_ADDRTYPE
    MAPI_SENDER_ENTRYID
    MAPI_SENDER_SMTP_ADDRESS 
    MAPI_SEND_RICH_INFO
    MAPI_MESSAGE_CLASS
    MAPI_MESSAGE_LOCALE_ID   
    MAPI_SEND_RICH_INFO
    MAPI_MESSAGE_CODEPAGE
    MAPI_SEARCH_KEY
    MAPI_IMPORTANCE
    MAPI_CLIENT_SUBMIT_TIME  
    MAPI_LAST_MODIFICATION_TIME
    MAPI_OWNER_APPT_ID
    MAPI_START_DATE
    MAPI_END_DATE
    MAPI_READ_RECEIPT_REQUESTED
    MAPI_ORIGINATOR_DELIVERY_REPORT_REQUESTED
    MAPI_LAST_MODIFIER_NAME  
    MAPI_REPLY_REQUESTED
    MAPI_RESPONSE_REQUESTED  
    MAPI_SUBJECT
    MAPI_SUBJECT_PREFIX
    MAPI_SENSITIVITY
    MAPI_ORIGINAL_SENSITIVITY
    MAPI_CONVERSATION_INDEX  
    MAPI_CONVERSATION_TOPIC  
    MAPI_SMTP_MESSAGE_ID
    MAPI_INTERNET_CODEPAGE   
    MAPI_ICON_INDEX
    MAPI_CREATION_TIME
    MAPI_ALTERNATE_RECIPIENT_ALLOWED
    MAPI_PRIORITY
    MAPI_RECIPIENT_REASSIGNMENT_PROHIBITED
    MAPI_NON_RECEIPT_NOTIFICATION_REQUESTED
    MAPI_TARGET_ENTRY_ID
    MAPI_CONVERSATION_ID
    MAPI_CREATOR_NAME
    MAPI_CREATOR_ADDRESS_TYPE
    MAPI_CREATOR_EMAIL_ADDRESS
    MAPI_SENDER_SIMPLE_DISPLAY_NAME
    MAPI_SENT_REPRESENTING_SIMPLE_DISPLAY_NAME
    MAPI_CREATOR_SIMPLE_DISP_NAME
    MAPI_LAST_MODIFIER_SIMPLE_DISPLAY_NAME
    MAPI_INTERNET_MAIL_OVERRIDE_FORMAT
    MAPI_MESSAGE_EDITOR_FORMAT
    MAPI_STORE_SUPPORT_MASK  
<body text goes here>
@petri
Copy link
Member

petri commented Feb 4, 2021

Thanks for the compliments, good to hear. The scope of tnefparse is just that - parsing. Is there something more that it should be able to parse, maybe somehow better, to support your use case of converting to .ics ? (nice idea btw)

@jrideout
Copy link
Collaborator

jrideout commented Feb 5, 2021

The relevant MS doc seems to be MS-OXCICAL. Though it describes how to convert ical to mapi/tnef, I suspect one could use the same reference for the reverse operation. At a glance, that we may not parse looks like the recipient tracking/reply information.

@timtomch
Copy link

timtomch commented Jun 8, 2022

I had the same issue and it was driving me nuts, so I wrote a short script using tnefparse to extract the calendar invitation data to an .ics file: https://github.com/timtomch/tnef2ics/

Maybe if I figure out how to do it I will do a PR to have this functionality added to the tnefparse command-line tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants