ThunderbirdSummary Class

Reads and writes the summary files of the folders of Thunderbird (.msf), the Mork databases next to the mbox files of the folders.

public static class ThunderbirdSummary

Example

var messages = ThunderbirdSummary.ReadMessages(path);
var first = messages[0];
Assert.Equal("First", first.Subject);
Assert.Equal("first@example.com", first.MessageId);
Assert.Equal(new DateTimeOffset(2025, 7, 1, 8, 52, 37, TimeSpan.Zero), first.Date);
Assert.True(first.Flags.HasFlag(ThunderbirdMessageFlags.Read));

// The position of the message in the mbox file of the folder
Assert.Equal(421, messages[1].Offset);

Methods

NameDescription
Create(IEnumerable<ThunderbirdMessageSummary>)Creates a summary of messages: a Mork database with a table of messages, with the columns Thunderbird reads. Thunderbird rebuilds a summary that does not match its folder.
ReadMessages(MorkDocument)Returns the messages of a summary: the rows of its table of messages.
ReadMessages(string)Returns the messages of a summary file.

Create(IEnumerable<ThunderbirdMessageSummary>)

ThunderbirdSummary.cs

Creates a summary of messages: a Mork database with a table of messages, with the columns Thunderbird reads. Thunderbird rebuilds a summary that does not match its folder.

public static MorkDocument Create(IEnumerable<ThunderbirdMessageSummary> messages)

Parameters

messages IEnumerable<ThunderbirdMessageSummary>
The messages.

Returns

MorkDocument The summary.

ReadMessages overloads

ReadMessages(MorkDocument)

ThunderbirdSummary.cs

Returns the messages of a summary: the rows of its table of messages.

public static IEnumerable<ThunderbirdMessageSummary> ReadMessages(MorkDocument document)
Parameters
document MorkDocument
The summary.
Returns

IEnumerable<ThunderbirdMessageSummary> The messages.

ReadMessages(string)

ThunderbirdSummary.cs

Returns the messages of a summary file.

public static IReadOnlyList<ThunderbirdMessageSummary> ReadMessages(string path)
Parameters
path string
The path of the .msf file.
Returns

IReadOnlyList<ThunderbirdMessageSummary> The messages.

Exceptions
InvalidEmailDataException
The file is not a Mork database.

Constants

NameDescription
MessagesRowScopeThe scope of the rows of the messages.
MessagesTableKindThe kind of the table of the messages.

MessagesRowScope

The scope of the rows of the messages.

public const string MessagesRowScope = "ns:msg:db:row:scope:msgs:all"

MessagesTableKind

The kind of the table of the messages.

public const string MessagesTableKind = "ns:msg:db:table:kind:msgs"