Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
On 04Jul2015 21:10, jd1008 jd1008@gmail.com wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
Not offhand, but had you considered using external tools?
TB local folders are UNIX mbox files. If you should down TB, you can modify the mbox file as you see fit and then blow away TB's index file for that folder. TB will reread the mbox and reconstruct the index file with the correct values when you open it again.
If you go this way you could use something like mutt to open the folder, sort by date (a purely visual effect) and save the messages to another mbox file. See if they are saved in date order in the new file (by looking at it with a tool like "less", or any other text file viewer). If so, copy the new folder back onto the TB folder file.
Or you could write a short program to read the mbox file into memory (this would be easy in Python, which has mbox reading library functions), sorts the messages, and writes them out in date order to a new file. Then copy back to the TB folder.
Etc.
Remember to take a backup first! (Just copy your whole TB folder directory in case of accidents.)
Finally, _why_ do you want the TB folder in date order, physically? What is the objective here?
Cheers, Cameron Simpson cs@zip.com.au
That's just the sort of bloody stupid name they would choose. - Reginald Mitchell, designer of the Spitfire
On 07/04/15 23:00, Cameron Simpson wrote:
On 04Jul2015 21:10, jd1008 jd1008@gmail.com wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
Not offhand, but had you considered using external tools?
<>
all of what you posted is not necessary. what op desires is already available.
see my reply to jd1008's post.
On 07/04/2015 10:00 PM, Cameron Simpson wrote:
On 04Jul2015 21:10, jd1008 jd1008@gmail.com wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
Not offhand, but had you considered using external tools?
TB local folders are UNIX mbox files. If you should down TB, you can modify the mbox file as you see fit and then blow away TB's index file for that folder. TB will reread the mbox and reconstruct the index file with the correct values when you open it again.
If you go this way you could use something like mutt to open the folder, sort by date (a purely visual effect) and save the messages to another mbox file. See if they are saved in date order in the new file (by looking at it with a tool like "less", or any other text file viewer). If so, copy the new folder back onto the TB folder file.
Or you could write a short program to read the mbox file into memory (this would be easy in Python, which has mbox reading library functions), sorts the messages, and writes them out in date order to a new file. Then copy back to the TB folder.
Etc.
Remember to take a backup first! (Just copy your whole TB folder directory in case of accidents.)
Finally, _why_ do you want the TB folder in date order, physically? What is the objective here?
Reason is that I used to have accounts from many other email servers where I had different user names too. So, I ended up with several profiles in my TB (.thunderbird) for each server I had an account on.
When I finally settled on my current gmail account, I decided to cat all Inbox folders into one Inbox folder, and all Sent folders into one Sent folder (the only folders I cared to keep). But due to the fact I was sending/receiving emails on all those profiles in those years, the dates are thus mixed. I want the physical layout to be by date so that if and when I decide to use a CLI mail client which does not sort messages by date, everything will be in chronological order.
Cheers, Cameron Simpson cs@zip.com.au
That's just the sort of bloody stupid name they would choose. - Reginald Mitchell, designer of the Spitfire
On 05Jul2015 11:21, jd1008 jd1008@gmail.com wrote:
Remember to take a backup first! (Just copy your whole TB folder directory in case of accidents.)
Finally, _why_ do you want the TB folder in date order, physically? What is the objective here?
Reason is that I used to have accounts from many other email servers where I had different user names too. [...] When I finally settled on my current gmail account, I decided to cat all Inbox folders into one Inbox folder, [...] I want the physical layout to be by date so that if and when I decide to use a CLI mail client which does not sort messages by date, everything will be in chronological order.
Aha.
I use a CLI mail client: mutt. And it will sort by date out of the box (or by many other criteria at your whim).
I recommend choosing a superior CLI mail client when you need to do that.
Cheers, Cameron Simpson cs@zip.com.au
All mail clients suck. This one just sucks less. - www.mutt.org
On 07/04/15 22:10, jd1008 wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
. that ability is already available with;
View > Sort by > { personal selections }
You can e.g. use "ls" and "mv" shell commands to move the old directory ( "folder") content in the new one in the desired order..
---------- Původní zpráva ---------- Od: g geleem@bellsouth.net Komu: Community support for Fedora users users@lists.fedoraproject.org Datum: 5. 7. 2015 7:03:07 Předmět: Re: TB - Sort add-on
"On 07/04/15 22:10, jd1008 wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
. that ability is already available with;
View > Sort by > { personal selections }
On 07/05/15 01:27, j.halifax2@seznam.cz wrote:
You can e.g. use "ls" and "mv" shell commands to move the old directory ("folder") content in the new one in the desired order..
uh... what???
in following, i am defining containers by their names as used in both thunderbird and as viewed with a file browser. first use will be marked with ' '. after, just by name.
op is wanting to arrange and sort within an 'email folder file', which is a 'file' containing emails, not a 'directory'.
a 'folder directory' does not contain emails. that is it should not because having emails in a 'top folder directory' can/may lead to corruption.
if an email folder file has emails that have been moved into it from random email folder files, the emails can end up in a non chronological order.
to arrange emails into a chronological order, they must be manually move, ie, dragged and dropped to either a temp email folder file, or to desire destination folder file in chronological order.
which is why i suggested using;
View > Sort by > { selection }
to view emails in order desired.
to my knowledge, and i just now checked again, there is no add-on that will physically sort emails by chronological order. there may be a '3rd party' add-on to physically sort emails by chronological order, but i am not aware of such. and yes, i have searched. tho not lately.
Sorry, I didn't know that it concerned to emails in the thunderbird.
---------- Původní zpráva ---------- Od: g geleem@bellsouth.net Komu: users@lists.fedoraproject.org Datum: 5. 7. 2015 10:14:06 Předmět: Re: TB - Sort add-on
"On 07/05/15 01:27, j.halifax2@seznam.cz wrote:
You can e.g. use "ls" and "mv" shell commands to move the old directory ("folder") content in the new one in the desired order..
uh... what???
in following, i am defining containers by their names as used in both thunderbird and as viewed with a file browser. first use will be marked with ' '. after, just by name.
op is wanting to arrange and sort within an 'email folder file', which is a 'file' containing emails, not a 'directory'.
a 'folder directory' does not contain emails. that is it should not because having emails in a 'top folder directory' can/may lead to corruption.
if an email folder file has emails that have been moved into it from random email folder files, the emails can end up in a non chronological order.
to arrange emails into a chronological order, they must be manually move, ie, dragged and dropped to either a temp email folder file, or to desire destination folder file in chronological order.
which is why i suggested using;
View > Sort by > { selection }
to view emails in order desired.
to my knowledge, and i just now checked again, there is no add-on that will physically sort emails by chronological order. there may be a '3rd party' add-on to physically sort emails by chronological order, but i am not aware of such. and yes, i have searched. tho not lately.
On 07/05/15 02:42, j.halifax2@seznam.cz wrote:
Sorry, I didn't know that it concerned to emails in the thunderbird.
. not a problem here. :-)
On 07/04/2015 10:02 PM, g wrote:
On 07/04/15 22:10, jd1008 wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
. that ability is already available with;
View > Sort by > { personal selections }
Cameron reiterated that it is only a visual sort, and does not modify the inbox contents by the sort.
On 07/05/15 12:22, jd1008 wrote:
On 07/04/2015 10:02 PM, g wrote:
On 07/04/15 22:10, jd1008 wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
. that ability is already available with;
View > Sort by > { personal selections }Cameron reiterated that it is only a visual sort, and does not modify the inbox contents by the sort.
. agreed. read my post;
Date: Sun, 05 Jul 2015 02:13:41 -0500
several years ago, i had similar need as you and found that to get a physical chronological sort order, it must be done manually using drag and drop.
i did verified that thunderbird devs did not write their move or copy functions to move or copy by sort order.
to make drag and drop easier, what i ended up doing was to use color tagging to show sequential of the emails.
to explain:
1- the emails in sort folder were not tagged. 2- emails in each folder that i copied into sort folder were tagged with a unique color. 3- sort folder was set to sort by date giving obvious grouping by the grouping of color. 4- emails that were not grouped were moved individually to physical sort folder. 5- emails that were grouped by color were moved by group to physical sort folder. 6- after physical sort folder was completed, i deleted original folders that i copied from.
a tedious process, but i did end up with emails in a true physical chronological order.
if you think about what all would be required to create an add-on that would do such a sort, you would probably agree that it would be a task that near all of the add-on devs are unable to reason how to do such.
to my thinking, it would be rather involved writing such a routine in c/c++ or any other language.
if i were more versed with c/c++, i would write it to first make a scan of 'date and time' and 'message id' of emails, then sort that info to chronological order.
next would be to use that order to individually move/copy the emails to a sorted file.
sounds simple, but it is involved.
On 07/05/2015 12:27 PM, g wrote:
On 07/05/15 12:22, jd1008 wrote:
On 07/04/2015 10:02 PM, g wrote:
On 07/04/15 22:10, jd1008 wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
. that ability is already available with;
View > Sort by > { personal selections }Cameron reiterated that it is only a visual sort, and does not modify the inbox contents by the sort.
. agreed. read my post;
Date: Sun, 05 Jul 2015 02:13:41 -0500several years ago, i had similar need as you and found that to get a physical chronological sort order, it must be done manually using drag and drop.
i did verified that thunderbird devs did not write their move or copy functions to move or copy by sort order.
to make drag and drop easier, what i ended up doing was to use color tagging to show sequential of the emails.
to explain:
1- the emails in sort folder were not tagged. 2- emails in each folder that i copied into sort folder were tagged with a unique color. 3- sort folder was set to sort by date giving obvious grouping by the grouping of color. 4- emails that were not grouped were moved individually to physical sort folder. 5- emails that were grouped by color were moved by group to physical sort folder. 6- after physical sort folder was completed, i deleted original folders that i copied from.
a tedious process, but i did end up with emails in a true physical chronological order.
if you think about what all would be required to create an add-on that would do such a sort, you would probably agree that it would be a task that near all of the add-on devs are unable to reason how to do such.
to my thinking, it would be rather involved writing such a routine in c/c++ or any other language.
if i were more versed with c/c++, i would write it to first make a scan of 'date and time' and 'message id' of emails, then sort that info to chronological order.
next would be to use that order to individually move/copy the emails to a sorted file.
sounds simple, but it is involved.
Too tedious 'cause there are over 100K emails :)
On 07/05/15 13:30, jd1008 wrote:
On 07/05/2015 12:27 PM, g wrote:
<<<>>>
a tedious process, but i did end up with emails in a true physical chronological order.
<<>>
sounds simple, but it is involved.
Too tedious 'cause there are over 100K emails :)
. learn c/c++ and write an add-on. :-D
On 05Jul2015 21:50, patrick o'callaghan pocallaghan@gmail.com wrote:
On Sun, 2015-07-05 at 12:30 -0600, jd1008 wrote:
Too tedious 'cause there are over 100K emails :)
Take a look at formail, part of the procmail package. It might be able to do what you want, or at least be part of the solution.
I suspect not because it only considers one message at a time.
He basicly needs to take his messages and append them to a new inbox in date order. He can either write a small program to suck messages into memory, sort them, then write them out, or find a mail client which will let him sort the view by date, tag/mark all the messages, then feed them all _in_view_order_ to a fresh folder/mbox/mail-filing program.
He sould at first cut try that in TB, since that's what he's using:
- view by date - _copy_ all messages to new folder - quit TB and examine the new folder to see what physical order it has
The catch of course is that one can easily imagine a mail reader choosing to do that copy in the present physical order for I/O efficiency reasons because the mail recent author takes the view that the end user can always view the messages in any order they like. So this approach may need to be tried in various mail readers until one is found that acts in the view order.
Or one can write a program, where one has complete control. But if you can get a mail client to do it then that will probably be faster.
Cheers, Cameron Simpson cs@zip.com.au
On 07/06/15 00:21, Cameron Simpson wrote: <<>>
He basicly needs to take his messages and append them to a new inbox in date order. He can either write a small program to suck messages into memory, sort them, then write them out, or find a mail client which will let him sort the view by date, tag/mark all the messages, then feed them all _in_view_order_ to a fresh folder/mbox/mail-filing program.
that could work, tho i believe first scanning emails to build a sort table, then pull out emails to a new file according to table would run better than having to keep up with where emails are in memory.
He sould at first cut try that in TB, since that's what he's using:
- view by date
- _copy_ all messages to new folder
- quit TB and examine the new folder to see what physical order it has
if that would work it would be great. unfortunately, thunderbird does not work that.
The catch of course is that one can easily imagine a mail reader choosing to do that copy in the present physical order for I/O efficiency reasons because the mail recent author takes the view that the end user can always view the messages in any order they like.
it does seem that is attitude of thunderbird devs because if one sorts emails chronologically then moves or copies to new folder file, emails will maintain order they were in original folder file.
So this approach may need to be tried in various mail readers until one is found that acts in the view order.
been there with thunderbird. does not work.
Or one can write a program, where one has complete control. But if you can get a mail client to do it then that will probably be faster.
such is true. also true is fact thunderbird is not such a client.
On 06Jul2015 01:22, g geleem@bellsouth.net wrote:
On 07/06/15 00:21, Cameron Simpson wrote:
He basicly needs to take his messages and append them to a new inbox in date order. He can either write a small program to suck messages into memory, sort them, then write them out, or find a mail client which will let him sort the view by date, tag/mark all the messages, then feed them all _in_view_order_ to a fresh folder/mbox/mail-filing program.
that could work, tho i believe first scanning emails to build a sort table, then pull out emails to a new file according to table would run better than having to keep up with where emails are in memory.
Depending on the library in use. In Python I'd just read them all into Messages, which will keep the whole message in memory. Sort them, write them. I agree scanning first would be more memory efficient: scan, sort scan offsets, read file chunks in sorted scan order. Might even be easier.
He sould at first cut try that in TB, since that's what he's using:
- view by date
- _copy_ all messages to new folder
- quit TB and examine the new folder to see what physical order it has
if that would work it would be great. unfortunately, thunderbird does not work that. [...]
The catch of course is that one can easily imagine a mail reader choosing to do that copy in the present physical order for I/O efficiency reasons [...]
it does seem that is attitude of thunderbird devs because if one sorts emails chronologically then moves or copies to new folder file, emails will maintain order they were in original folder file.
Inconvenient.
[...]
Or one can write a program, where one has complete control. But if you can get a mail client to do it then that will probably be faster.
such is true. also true is fact thunderbird is not such a client.
But a brief experiment here suggests that mutt _is_ such a client. So he couldd open the original mbox in moutt, sort the view, tag all messages (T.<enter>) then copy all tagged messages to a new folder (;Cnew_folder<enter>).
Cheers, Cameron Simpson cs@zip.com.au
You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat. - Albert Einstein, when asked to describe radio
On 07/06/15 02:53, Cameron Simpson wrote:
On 06Jul2015 01:22, g geleem@bellsouth.net wrote:
<<<>>>
it does seem that is attitude of thunderbird devs because if one sorts emails chronologically then moves or copies to new folder file, emails will maintain order they were in original folder file.
Inconvenient.
inconsiderate describes better. :-)
Or one can write a program, where one has complete control. But if you can get a mail client to do it then that will probably be faster.
such is true. also true is fact thunderbird is not such a client.
But a brief experiment here suggests that mutt _is_ such a client. So he couldd open the original mbox in moutt, sort the view, tag all messages (T.<enter>) then copy all tagged messages to a new folder (;Cnew_folder<enter>).
ok. that is great to know if i ever have to merge email again.
Cheers,
!OPA!
You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat.
- Albert Einstein, when asked to describe radio
a very wise man who believed in simplification. ;-)
On 07/06/2015 12:22 AM, g wrote:
On 07/06/15 00:21, Cameron Simpson wrote: <<>>
He basicly needs to take his messages and append them to a new inbox in date order. He can either write a small program to suck messages into memory, sort them, then write them out, or find a mail client which will let him sort the view by date, tag/mark all the messages, then feed them all _in_view_order_ to a fresh folder/mbox/mail-filing program.
that could work, tho i believe first scanning emails to build a sort table, then pull out emails to a new file according to table would run better than having to keep up with where emails are in memory.
He sould at first cut try that in TB, since that's what he's using:
- view by date
- _copy_ all messages to new folder
- quit TB and examine the new folder to see what physical order it has
if that would work it would be great. unfortunately, thunderbird does not work that.
The catch of course is that one can easily imagine a mail reader choosing to do that copy in the present physical order for I/O efficiency reasons because the mail recent author takes the view that the end user can always view the messages in any order they like.
it does seem that is attitude of thunderbird devs because if one sorts emails chronologically then moves or copies to new folder file, emails will maintain order they were in original folder file.
So this approach may need to be tried in various mail readers until one is found that acts in the view order.
been there with thunderbird. does not work.
Or one can write a program, where one has complete control. But if you can get a mail client to do it then that will probably be faster.
such is true. also true is fact thunderbird is not such a client.
Add to this is that the entire mozilla libraries are still using 32 bit file size limits! Just tried it by catenating many folders into a single folder exceeding 4GB (11.8 GB, to be exact). I then tried to move a message into the huge folder. It popped the alert banner (Yellow Triangle with a bang in it), saying:
The folder HugeFolder is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.
Hey guys, we are in the 21st century, and mozilla is still living in the first incarnation of the 32bit filesystems era (I forget what year that was :) )
On 07/06/15 11:46, jd1008 wrote: <<>>
Add to this is that the entire mozilla libraries are still using 32 bit file size limits! Just tried it by catenating many folders into a single folder exceeding 4GB (11.8 GB, to be exact). I then tried to move a message into the huge folder. It popped the alert banner (Yellow Triangle with a bang in it), saying:
The folder HugeFolder is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.
that is interesting, because the oos know it all's claim that there is no limit.
looks like you may have to sort by year also.
Hey guys, we are in the 21st century, and mozilla is still living in the first incarnation of the 32bit filesystems era (I forget what year that was :) )
you are dreaming if you think the devs will do anything about is.
On 07/06/2015 10:59 AM, g wrote:
On 07/06/15 11:46, jd1008 wrote: <<>>
Add to this is that the entire mozilla libraries are still using 32 bit file size limits! Just tried it by catenating many folders into a single folder exceeding 4GB (11.8 GB, to be exact). I then tried to move a message into the huge folder. It popped the alert banner (Yellow Triangle with a bang in it), saying:
The folder HugeFolder is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.
that is interesting, because the oos know it all's claim that there is no limit.
looks like you may have to sort by year also.
Hey guys, we are in the 21st century, and mozilla is still living in the first incarnation of the 32bit filesystems era (I forget what year that was :) )
you are dreaming if you think the devs will do anything about is.
It is worse than that. In all the bugs filed against TB (and thus, indirectly against the Mozilla libraries) have been closed as either insufficient data or dupplicate of some other bug which has been closed as fixed.
These guys are really doped :)
On 07/06/15 12:06, jd1008 wrote: <<>>
These guys are really doped :)
very true. i wonder where they get their 'green'. ;-)
On 07/06/2015 09:46 AM, jd1008 wrote:
Add to this is that the entire mozilla libraries are still using 32 bit file size limits! Just tried it by catenating many folders into a single folder exceeding 4GB (11.8 GB, to be exact).
Yes, and Maildir is the intended solution to that limit, because compacting mbox files is an expensive operation, and incremental backup of mbox files is difficult or impossible depending on your backup software.
Note that you *can* use a folder larger than 4GB if it is IMAP, and only if it is IMAP.
On 07/06/2015 11:18 AM, Gordon Messmer wrote:
On 07/06/2015 09:46 AM, jd1008 wrote:
Add to this is that the entire mozilla libraries are still using 32 bit file size limits! Just tried it by catenating many folders into a single folder exceeding 4GB (11.8 GB, to be exact).
Yes, and Maildir is the intended solution to that limit, because compacting mbox files is an expensive operation, and incremental backup of mbox files is difficult or impossible depending on your backup software.
Well, I just wanted to underscore that the MozDev team is simply INCAPABLE of prting the Moz libraries into the present time. They are indeed stuck in a time loop of 32 bits.
Note that you *can* use a folder larger than 4GB if it is IMAP, and only if it is IMAP.
Certainly - because the Google server handles huge files and filesystems and devices.
Not sure about other mail servers.
On 06Jul2015 10:18, Gordon Messmer gordon.messmer@gmail.com wrote:
On 07/06/2015 09:46 AM, jd1008 wrote:
Add to this is that the entire mozilla libraries are still using 32 bit file size limits! Just tried it by catenating many folders into a single folder exceeding 4GB (11.8 GB, to be exact).
Yes, and Maildir is the intended solution to that limit, because compacting mbox files is an expensive operation,
Maildir is really a solution to lockless parallel mail folder access. It does store things as inidivdual messages, one per file, and I use it in my larger more active mail folders. My less active folders (receiving filed email, but accessed in frequently) are mboxen: it is more compact and cheaper to in storage and filesystems.
and incremental backup of mbox files is difficult or impossible depending on your backup software. [...]
In my world mboxen are easier to back up in some ways, more expensive in others. I backup with rsync and date stampted hardlinked backup trees: unchanges files get hardlinked to the next tree. In this scheme a Maildir only makes new files for the new messages, which is a win in storage. But a larger maildir is very slow to scan, especially on a physical disc. By comparison, an mbox makes a whole new copy of the mbox if it gets changed, but it is very cheaper to scan (one file).
I'm still amazed that TB doesn't let you use Maildirs; they're hardly difficult.
Cheers, Cameron Simpson cs@zip.com.au
My life is a never ending battle for the forces of good. Unfortunately, unlike many other crusaders for righteousness, in my system of morality, the right thing to do is very often to sit around reading the paper or watching TV. - Tim_Mefford tim@physics.orst.edu
On 07/06/2015 02:11 PM, Cameron Simpson wrote:
I'm still amazed that TB doesn't let you use Maildirs; they're hardly difficult.
On 06Jul2015 14:20, Gordon Messmer gordon.messmer@gmail.com wrote:
On 07/06/2015 02:11 PM, Cameron Simpson wrote:
I'm still amazed that TB doesn't let you use Maildirs; they're hardly difficult.
Oh. When did that happen? (I see it is not exposed by default.)
Thanks for the link!
Cheers, Cameron Simpson cs@zip.com.au
Louis Pasteur's theory of germs is ridiculous fiction. --Pierre Pachet, Professor of Physiology at Toulouse, 1872
On 07/06/2015 03:39 PM, Cameron Simpson wrote:
Oh. When did that happen? (I see it is not exposed by default.)
As far as I know, it's been there a while. That page says it wasn't ready for testing prior to release 38, though I don't recall having seen such "not ready for testing" statements in the past.
On Mon, 2015-07-06 at 15:21 +1000, Cameron Simpson wrote:
Take a look at formail, part of the procmail package. It might be
able
to do what you want, or at least be part of the solution.
I suspect not because it only considers one message at a time.
Sure, but splitting the mbox into separate messages is one step towards being able to re-order them as he likes. It's been years since I used formail but I'm thinking of the -x flag to extract the relevant date field and then use that as the basis for the file name. It would still need some further munging to get the files into sortable order of course.
poc
On 07/05/2015 11:21 PM, Cameron Simpson wrote:
On 05Jul2015 21:50, patrick o'callaghan pocallaghan@gmail.com wrote:
On Sun, 2015-07-05 at 12:30 -0600, jd1008 wrote:
Too tedious 'cause there are over 100K emails :)
Take a look at formail, part of the procmail package. It might be able to do what you want, or at least be part of the solution.
I suspect not because it only considers one message at a time.
He basicly needs to take his messages and append them to a new inbox in date order. He can either write a small program to suck messages into memory, sort them, then write them out, or find a mail client which will let him sort the view by date, tag/mark all the messages, then feed them all _in_view_order_ to a fresh folder/mbox/mail-filing program.
He sould at first cut try that in TB, since that's what he's using:
- view by date
- _copy_ all messages to new folder
- quit TB and examine the new folder to see what physical order it has
The catch of course is that one can easily imagine a mail reader choosing to do that copy in the present physical order for I/O efficiency reasons because the mail recent author takes the view that the end user can always view the messages in any order they like. So this approach may need to be tried in various mail readers until one is found that acts in the view order.
Or one can write a program, where one has complete control. But if you can get a mail client to do it then that will probably be faster.
Cheers, Cameron Simpson cs@zip.com.au
One of the difficulties of using either a script or a C/++ prog to sort the messages is the following:
In earlier TB releases, the start of a message looked like this:
From - Sun Apr 06 10:43:07 2008 From - Sun Apr 06 10:47:01 2008
Shortly later it switched to this (as a result of running update): From - Mon Apr 7 22:07:19 2008 From - Mon Apr 7 21:41:07 2008
So, my question is: is this due to a configuration setting or is it due to TB changing the string output of the date?
If a configuration issue, I would like to set the date to be something like this year month day hour min secs
Thanx,
JD
On 07/06/2015 09:26 AM, jd1008 wrote:
One of the difficulties of using either a script or a C/++ prog to sort the messages is the following:
...
That shouldn't be a problem at all. A new message is marked by a line that starts with "From ", and everything after the '-' can be parsed with the system date libraries. Or ignored. Some messages won't have a date on that line at all. For those that do, that date will mark when Thunderbird downloaded the message, not the Date in the message, so it's probably not what you want anyway.
On 07/06/2015 10:49 AM, Gordon Messmer wrote:
On 07/06/2015 09:26 AM, jd1008 wrote:
One of the difficulties of using either a script or a C/++ prog to sort the messages is the following:
...
That shouldn't be a problem at all. A new message is marked by a line that starts with "From ", and everything after the '-' can be parsed with the system date libraries. Or ignored. Some messages won't have a date on that line at all. For those that do, that date will mark when Thunderbird downloaded the message, not the Date in the message, so it's probably not what you want anyway.
Right. The line: Date: Tue, 15 Oct 2013 07:30:42 -0700
is the more exact one for chronological sorting.
On 07/06/15 12:03, jd1008 wrote: <<>>
Right. The line: Date: Tue, 15 Oct 2013 07:30:42 -0700
is the more exact one for chronological sorting.
most true.
if one uses the "From - ", they would not be in same order if one uses the "Date: " line.
mutt is the way to go to get your sort. no need for coding.
On 05/07/2015 04:10, jd1008 wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
You might be able to do what you want using the ImportExportTools extension: https://freeshell.de/~kaosmos/mboximport-en.html
This extension lets you export all messages in a folder to individual files. The filenames are customisable with time and date prefixes.
Having exported all the messages, you might well then be able to re-import using the same tool to import in time and date order (i.e. alphabetical order in the directory).
I've not tried doing this but it looks like it *should* work.
On 07/06/2015 04:11 AM, Mark Rousell wrote:
On 05/07/2015 04:10, jd1008 wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
You might be able to do what you want using the ImportExportTools extension: https://freeshell.de/~kaosmos/mboximport-en.html
This extension lets you export all messages in a folder to individual files. The filenames are customisable with time and date prefixes.
Having exported all the messages, you might well then be able to re-import using the same tool to import in time and date order (i.e. alphabetical order in the directory).
I've not tried doing this but it looks like it *should* work.
That's awesome. I will certainly try it!! But if it does not work, then Cameron's (and others) suggestion to use mutt cli mail client might be the way to go.
On 06/07/2015 17:53, jd1008 wrote:
On 07/06/2015 04:11 AM, Mark Rousell wrote:
On 05/07/2015 04:10, jd1008 wrote:
Looked for an add-on that will sort a folder by date (not for display purposes) but to physically re-organize a floder's messages so that they are sorted from oldest to most recent.
Any info on that?
You might be able to do what you want using the ImportExportTools extension: https://freeshell.de/~kaosmos/mboximport-en.html
This extension lets you export all messages in a folder to individual files. The filenames are customisable with time and date prefixes.
Having exported all the messages, you might well then be able to re-import using the same tool to import in time and date order (i.e. alphabetical order in the directory).
I've not tried doing this but it looks like it *should* work.
That's awesome. I will certainly try it!! But if it does not work, then Cameron's (and others) suggestion to use mutt cli mail client might be the way to go.
Good luck. Hope it works as you need.