4

I am trying to sort the messages in my inbox by the number of messages from / to email address.

After having sorted by Sort by -> From and Grouped By Sort and then displaying the Total column, I am unable to sort by the Total while keeping the sort grouping intact.

How can I sort the messages in my inbox by message count in Thunderbird?

Thunderbird inbox state after having sorted

2
  • @amiregelz, thanks for the screenshot. The count 1,4,3,93,42,29 is showing for me too. But how do I sort that to get 1,3,4,29,42,93?
    – Rajasankar
    Sep 26, 2012 at 13:26
  • I searched for a solution too, but couldn't find anything.
    – amiregelz
    Sep 26, 2012 at 15:29

2 Answers 2

0

As it is not possible to sort the count in Thunderbird, I used python mail module to sort. My code is below

import email,collections
mboxfile = 'C:/INBOX'
for em in mailbox.mbox(mboxfile):
    mailids.append(em['From'])
Counter(mailids)

This has given what I expected. This can be used for To,Cc,Bcc fields too.

5
  • Can this be installed as an Add-on?
    – McArthey
    Jun 25, 2014 at 22:36
  • It is python code, I dont is there any addons exists for sorting via count
    – Rajasankar
    Jun 26, 2014 at 3:45
  • 11 years later ... is there any way to accomplish this within Tbird?
    – d0g
    Sep 11, 2023 at 19:47
  • There is this addon which is (supposedly) not compatible with Thunderbird anymore: addons.thunderbird.net/en-us/thunderbird/addon/sender-frequency There's also an addon to disable compatability checking (which might allow adding that other addon), but that addon is no longer compatible :) Sep 11, 2023 at 21:12
  • This answer had broken code. I submitted an edit that fixes it. Sep 11, 2023 at 21:55
0

Building on @Rajasankar's answer - which seemed broken for me, here was a working version

from collections import Counter
# tqdm is used to show a progress bar 
from tqdm import tqdm
import mailbox

mbox_filename = "your_filename"
mailids = []

mbox = mailbox.mbox(mbox_filename)
for em in tqdm(mbox, total=len(mbox)):
    mailids.append(em['From'])

Counter(mailids)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .