[SOLVED] Manually deleting many specific emails in Thunderbird.
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
will take the above emails as what? (which format?)
If it was a text file processing request you ought to explain it better.
Why do you want to sort them before removing at all?
will take the above emails as what? (which format?)
If it was a text file processing request you ought to explain it better.
Why do you want to sort them before removing at all?
Yes, plain text file. Sorting them will make it easier to look through them.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
By creating GUI apps humanity has traded the need for coding and shortcuts for doing the same dumb things over and over. Not your fault but that is how it is.
If your mail file structure is Maildir (every mail in a separate file) you could use the find command with an -exec grep "From: address@domain.com". Which if grep returns zero should result in deleting the file.
Which is doable, but dangerous at the same time, because a little error here or there could wipe out your complete mail collection. Besides, grepping a string like "From: address@domain.com" would give a match on any string, so even if the mail was forwarded or replied or even contains the string in the message body.
There might exist other utilities which do a more secure match, but then you are quickly bound to use Perl or Python.
Even when such a script is created it should be tested extensively in a very large set of test mails to see if there are no unwanted effects.
Last but not least, don't forget Maildir is a universal format which not only Thunderbird can access, but also a variety of other mail applications, which might be scriptable. I am a Thunderbird user as well, and I never looked into that option.
Lastly, if your storage format is Mailbox, forget anything like direct access to your mails. It is a stupid and monolithic format IMHO.
I think there's a misunderstanding on what I meant in my initial post. In the image attached, I copy the email addresses I want to delete into the search function. Those it finds, I select and delete manually. I do this every few months.
Use Thunderbird's Message Filter function (found on the Tools menu) to move the messages into the Trash (or a "Hold" folder for review prior to deletion)
You can define filter(s) and set them to be manually run when you want to do the cleanup and/or you can use the filter(s) to move them somewhere on receipt, so they're ready for review and/or deletion at any time.
In short, move them out of the Inbox first, then sort/delete/whatever from the target folder.
If you're email access to your server is IMAP, then what he said definitely applies. I have a server-side perl script that scans emails I've manually put in a "Spam" folder, extracts the sending IP address, which I then look up to find a reporting address. I then run another script, giving it the reporting address, IP address, and name of the Maildir file, and it sends an abuse report to the hosting company. That only works because I'm processing all the messages in a given folder, so there's little risk. I couldn't do that if my mail was in mbox format.
If you're POP3-ing the mail, then it's largely impractical to deal with the mail in Thunderbird's profile location on your local desktop.
I think there's a misunderstanding on what I meant in my initial post. In the image attached, I copy the email addresses I want to delete into the search function. Those it finds, I select and delete manually. I do this every few months.
so what's wrong with that?
want to automate that? create a filter.
Use Thunderbird's Message Filter function (found on the Tools menu) to move the messages into the Trash (or a "Hold" folder for review prior to deletion)
You can define filter(s) and set them to be manually run when you want to do the cleanup and/or you can use the filter(s) to move them somewhere on receipt, so they're ready for review and/or deletion at any time.
In short, move them out of the Inbox first, then sort/delete/whatever from the target folder.
Hi scasey.
I have no Message Filter function under Tools. I'm using TB 52.8.0. Maybe the filters comes with a newer version?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.