Skip to content

Conversation

@kimberlyz
Copy link

@kimberlyz kimberlyz commented Nov 7, 2025

Summary

This PR adds support for retrieving the MAPI PR_CONVERSATION_INDEX property from message objects in the Python bindings.

Motivation

The conversation index is a critical property for email threading and conversation tracking in Microsoft Outlook/Exchange PST files. This property was previously inaccessible through pypff, making it difficult to reconstruct email conversation threads or perform thread-based analysis of PST files.

Changes Made

Core Implementation (pypff/pypff_message.c, pypff/pypff_message.h):

  • Added pypff_message_get_conversation_index() function
  • Returns raw binary data as bytes (Python 3) or str (Python 2)
  • Returns None if the property doesn't exist
  • Exposed as both method message.get_conversation_index() and property message.conversation_index

API Usage

import pypff

pff_file = pypff.file()
pff_file.open("sample.pst")
message = pff_file.get_root_folder().get_sub_message(0)

# Method access
conv_index = message.get_conversation_index()  # Returns bytes or None

# Property access
conv_index = message.conversation_index  # Returns bytes or None

pff_file.close()

Technical Notes

  • Uses existing libpff_message_get_conversation_index() and libpff_message_get_conversation_index_size() functions from the C library
  • Follows the same pattern as other property getters in pypff_message.c

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

Successfully merging this pull request may close these issues.

1 participant