Export Just The Headers
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.
- IF ( FROM = RETURN_PATH ) discard RETURN_PATH
- IF ( FROM = REPLY-TO ) discard REPLY-TO
- FIND ( Column(1) = FROM )
- INCREMENT Column(4) COUNT FROM's
- IF ( RETURN_PATH <> empty ) {
- IF ( Column(2) <> RETURN_PATH ) INCREMENT Column(5) ReturnPathDifferences
- }
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.