Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More
Open

Export Just The Headers

Colin WG replied
Colin WG

What I want to do is to is export just the headers of emails on IMAP folders with an Excel VBA macro so that I can write filters to import into Thunderbird for deletion of old new letters and things of that nature, keeping only the important emails.

Knowing the message filter file format would also be nice considering that I can then just mass edit the filters without needing to recreate them each pass.

What I want to do is to is export just the headers of emails on IMAP folders with an Excel VBA macro so that I can write filters to import into Thunderbird for deletion of old new letters and things of that nature, keeping only the important emails. Knowing the message filter file format would also be nice considering that I can then just mass edit the filters without needing to recreate them each pass.

All Replies (2)

There is a developer list. But I think you are trying to use tools you know to do this the hard way. VBA can not interact with Thunderbird well. It certainly has never need used to extract data from Thunderbird to my knowledge and reading the MBOX files with VBA is not something I would recommend. Not that I can understand how you would go about deleting mail based on headers anyway.

See developer resources here https://developer.thunderbird.net/add-ons/community

How are you planning on figuring out which emails to remove using the header information anyway?

Matt said

How are you planning on figuring out which emails to remove using the header information anyway?

Step one, read headers, extract FROM, RETURN_PATH, & REPLY-TO, worksheet columns.

  1. IF ( FROM = RETURN_PATH ) discard RETURN_PATH
  2. IF ( FROM = REPLY-TO ) discard REPLY-TO
  3. FIND ( Column(1) = FROM )
  4. INCREMENT Column(4) COUNT FROM's
  5. IF ( RETURN_PATH <> empty ) {
  6. IF ( Column(2) <> RETURN_PATH ) INCREMENT Column(5) ReturnPathDifferences
  7. }

I am a really good programmer, mailing list headers can be identified easy. Once found, I can then write a filter file which runs when I next start TB and prunes the mailing list emails out. Along with other assorted junk which I tag in the excel worksheeet via Column(7) CreateFilterEntry

I shall examine the provided link for resources.

Postavite pitanje

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.