HeaderTools ( for TB ) ver 0.6.0 available

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
Old Ausdilecce
Posts: 0
Joined: December 31st, 1969, 5:00 pm

HeaderTools ( for TB ) ver 0.6.0 available

Post by Old Ausdilecce »

This extension allows one to modify headers of an email message..

NOTE: this extension has been modified since the date this thread started.
The most current version is 0.6.0 and can be downloaded here
www.supportware.net/mozilla/HeaderTools.xpi


here's a pic of the ui
<img src="http://www.supportware.net/mozilla/hc2.jpg">

Any changes to header info will change the text to red ( like in the X-Categories value in the pic )
... This is so the user knows which values he has modified..
... If the user puts the value back to what it was before, the text color will revert to black

Headers you want *removed* from the message will appear disabled ( like X-Priority in the pic )..
...To remove a header, the user would simply click on the header's name ( click again to keep )
.. you can ONLY remove headers that contain "X-" ( because messages should ALWAYS have To, Date, Subject etc. )

Header ordering is done through a user pref... like
user_pref("hdrtools.headers.order", "Date,To,From,Subject,X-Categories");
...if a header does not exist on the list in the pref, that header will get inserted after the ones that are in the list

Headers that you do NOT want to see at all can be inserted into this pref
user_pref("hdrtools.headers.ignore", "Return-Path,Reply-To,X-Spam,MIME,X-Virus,X-Mime,X-MSMail");

Note that the ignore algorithm matches headers that contain the first couple letters of the items in the user pref
so .. using the ignore userpref above, if these two headers exist in your message
X-Spam-Status
X-Spam-Level
...BOTH will be ignored

The extension ignores the following headers for safety reasons
Received, Message-ID, X-Account, X-UIDL, X-Mozilla, Delivered

New default headers ( that would appear in the dropdown boxes ( like X-Keywords and X-Custom ) are handled by
user_pref("hdrtools.headers.newdefault", "X-Categories,X-Keywords,X-Free");
.. if the header already exists in the message, the dropdown will NOT contain that header name.. (prevents duplicates )

Cheers
Last edited by Old Ausdilecce on May 21st, 2006, 6:58 pm, edited 2 times in total.
User avatar
johann_p
Posts: 8479
Joined: November 5th, 2002, 3:05 am
Location: Sheffield, UK

Post by johann_p »

How is this done technically? I thought one would have to re-write the whole mbox file for this?
“Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.”
User avatar
Pgr
Posts: 233
Joined: October 28th, 2003, 10:00 am
Location: Lisbon, Portugal

Post by Pgr »

Is that X-Categories field something we can use for Outlook-like categories? Is there any way to use that info to search and group messages?

Or am I dreaming?
Worra
Posts: 9
Joined: November 8th, 2004, 7:29 am
Location: Russia
Contact:

Post by Worra »

Audilecce!

I've just tried HeaderTools on two messages in wrong encoding - and I've read them! Your extension can solve most of the cases with wrong cyrilic encoding - caused by TB's disability to do it. I'll promote your extension amoung other users. In some time I'll prepare some simple interface questions on automation of the process.

THANK YOU
Old Ausdilecce
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Ausdilecce »

Johann_p,

Yes, the one message that the modifications are done on, are completely rewritten, and then appended onto the originals' folder mbox file

Pgr, you are NOT dreaming.. ( but its more like Gmail's categories :) ) This is the reason I made it..

Worra, you are welcome..

EDIT: just noticed that I hap not posted a link to the xpi

Get it from www.supportware.net/mozilla/HeaderTools.xpi

Cheers
TobyK
Posts: 103
Joined: December 4th, 2004, 12:32 am

Post by TobyK »

Hi ausdilecce,

I was thinking about the performance again... wouldn't it be possible to copy the message to an empty (or small) folder change it there and copy it back to the original folder again? This way you would not need to parse the whole mbox file of huge folders.
Old Ausdilecce
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Ausdilecce »

Wow, how big is the folder you are changing headers on ?

( I still cannot fathom having more than, say, 10Mib, of messages in any one folder.. )
TobyK
Posts: 103
Joined: December 4th, 2004, 12:32 am

Post by TobyK »

one of the folders is 190MB. Changing headers on in this folders takes something like 1 1/2 to 2 min.( the RAM might be the reason for the delay: on folders with 90MB it didn't take longer than a few seconds). But in the end I can just move the message on my own, change the header an move it back in the view cases I have to change headers on this folder...
Old Ausdilecce
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Ausdilecce »

I *can*, of course, move the original into another folder first, but that would entail alot more work..

Firstly, what if you wanted to change headers on a particular message, but found that you picked the wrong message... If the extension had already moved the message to a 'temporary' folder ( which causes a delete of the original in the original folder )..

Now the extension needs to move the message from the temporary folder back to the original folder ( causing yet another delete in the temp folder, which now requires that the temporary folder get either deleted or compacted.. )
The original folder now needs to be compacted as well ( since it still has the original that was 'marked for deletion' )

Not only that, but the extension would have to wait for any message to be copied from one folder to another. In that time, any number of things could go awry ( computer crash, TB crash, etc.) , and you could lose the message..

The way it is now, nothing happens to the original message until you click OK on the header changer box..

Maybe I have to revisit the code that is responsible for extracting the message source out of the mbox file..
TobyK
Posts: 103
Joined: December 4th, 2004, 12:32 am

Post by TobyK »

OK, again I didn't see all the things that have to be done in the background,... Sorry for bothering.
Old Ausdilecce
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Ausdilecce »

TobyK

While I dont have a folder with 190Mb of messages, I created one ( by copying many many messages to one test folder ( 1246 messages ) ).. This test folder is now 136Mb in size..

My header changer dialog comes up just as qucikly here as in any other folder ...

Have you compacted that folder lately ?
If so, have you tried to delete that folder's msf file and have TB recreate it ? ( do it when TB is shut down )
Old Ausdilecce
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Ausdilecce »

Same performance if the folder is 204Mb in size ( 1902 messages )..

Something is screwy with your folder is my guess..
TobyK
Posts: 103
Joined: December 4th, 2004, 12:32 am

Post by TobyK »

you are right! After deleting the .msf file it it workes without any performance problem.
Thanks for your help!
User avatar
Pgr
Posts: 233
Joined: October 28th, 2003, 10:00 am
Location: Lisbon, Portugal

Post by Pgr »

I'm having a problem with this extension...

I had a previous version installed. I uninstalled it, restarted TB, installed the new version, restarted TB.

Now I have TWO menu entries for "Change Header Details". Both of them immediately crash TB and prompt me to send error reports to Microsoft and to the Mozilla Quality Feedback Agent... :-(

Any suggestions? I was really looking forward to trying this...

Thanks
TobyK
Posts: 103
Joined: December 4th, 2004, 12:32 am

Post by TobyK »

did you uninstall both of the extensions and installed only the new version after restarting tb already. If not I'd try this.
If this does not help, try to clean the prefs.js file before installing the new version (delete all entries with hdrtools...)
Post Reply