networkException / thundersort

Sort incoming mails based on recipient slug
https://addons.thunderbird.net/en-US/thunderbird/addon/thundersort/
BSD 2-Clause "Simplified" License
4 stars 2 forks source link

mail being sorted according to recipient SMTP address not sender SMTP address #54

Closed troogyt closed 1 year ago

troogyt commented 1 year ago

thundersort appears to be sorting mail according to the recipient SMTP address and not the sender SMTP address, which is what we really want.

How can I debug this or see where it is getting the SMTP address to process from?

Example, if my email address is myusername@mydomain.co.uk and I receive an email from mr-spammer@dodgy.domain.net, with the match rule "(.+)@([^.]+).([^.]+).([^.]+)$" and the replacement regex "$4.$3.$2@$1", thundersort is sorting the email into the folder "uk.co.mydomain@myusername" instead of "net.domain.dodgy@mr-spammer" as expected.

LeMoonStar commented 1 year ago

This plugin was originally meant for people using a different E-Mail address for different services. For example I sign up on github with github@mydomain.tld and to google with google@mydomain.tld - So the plugin does work as intended.

It is however a good suggestion to add support for sorting by sender instead of recipient addresses. - Both modes can be useful.

troogyt commented 1 year ago

Ok, thanks so much for your reply. So I guess I misunderstood how it works?

For literally years I have been trying to find a mail client that could automatically move inbound mail to subfolders by sender domain. I was able to write VBA for Outlook to do it, but I have been trying really hard not to keep funding MS. I remain dumbfounded that to date it appears that absolutely no one has thought to provide this very useful, and I would say very basic, means of organizing inbound mail. But....well maybe you can consider this a feature request then?

I tried working out how to write one my self, but I don't do web-dev so this is all quite out of my depth.

I just want to be able to: 1) extract the SMTP sender address from inbound mail upon arrival in my inbox, then use the regex (just like you have done) to create the folder name to store that message in, and 2) run the plugin on existing folders to automatically organize all existing messages the same way as new messages.

LeMoonStar commented 1 year ago

That certainly can be done. I dunno if @networkException has the time for that - I just started school again today so my time is quite limited.

But the idea makes absolute sense - I think it would be a great addition to the plugin

networkException commented 1 year ago

I'm already working on a patch, ill see if I can get it done today still

troogyt commented 1 year ago

It would be absolute awesome if I could make the username a subfolder to the domain folder. I would be more than happy to do the coding, I just don't know where to look and what to do, I'm sorry.

But thanks so much again...

networkException commented 1 year ago

I've implemented sorting based on senders, I hope this solves your issue.

I submitted a new release to the addon store, if you don't want to wait you can bundle the extension yourself by running the bundle.sh script

troogyt commented 1 year ago

I've implemented sorting based on senders, I hope this solves your issue.

I submitted a new release to the addon store, if you don't want to wait you can bundle the extension yourself by running the bundle.sh script

Thanks so much.

troogyt commented 1 year ago

How long does publishing an add-on take usually?

networkException commented 1 year ago

I don't know sadly