LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 06-10-2018, 09:30 AM   #1
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,717

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Question Manually deleting many specific emails in Thunderbird.


Hi.

I manually delete emails in Thunderbird by putting emails like this into search and then deleting them:
action@eff.org | accounts@archive.org | accounts@wire.com | do-not-reply@imdb.com | do-not-reply-here@imdb.com

Is there a way to take the above emails (will come in handy for a very long list), remove the pipe and put on separate lines - so I can easily sort (e.g. in Pluma/Geany/etc.) them in a-z order?
e.g.
accounts@archive.org
accounts@wire.com
action@eff.org
do-not-reply-here@imdb.com
do-not-reply@imdb.com


I then want a quick way to add all the sorted emails in lots of 5 with 4 pipe (or symbols) like my original line.

Thanks.
 
Old 06-10-2018, 09:58 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
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?
 
Old 06-10-2018, 10:57 AM   #3
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,717

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by pan64 View Post
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.
 
Old 06-10-2018, 11:09 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
in that case I would suggest you to use awk/perl/python or something similar.
Also please post what did you try and we will help you to continue.
 
Old 06-10-2018, 11:41 AM   #5
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,717

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by pan64 View Post
in that case I would suggest you to use awk/perl/python or something similar.
Also please post what did you try and we will help you to continue.
Alas, I'm not a coder.
 
Old 06-10-2018, 01:11 PM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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.

jlinkels
 
Old 06-10-2018, 01:43 PM   #7
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,717

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Post

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.
Attached Thumbnails
Click image for larger version

Name:	tb.gif
Views:	14
Size:	39.5 KB
ID:	27859  
 
Old 06-10-2018, 02:14 PM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
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.
 
1 members found this post helpful.
Old 06-10-2018, 02:22 PM   #9
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Re: jlinkels excellent comments:

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.
 
1 members found this post helpful.
Old 06-11-2018, 12:20 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by linustalman View Post
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.
 
Old 06-16-2018, 08:10 AM   #11
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,717

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Post

Quote:
Originally Posted by scasey View Post
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?
 
Old 06-16-2018, 08:47 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
I think that should be there. somewhere.
https://support.mozilla.org/en-US/kb...-using-filters
 
1 members found this post helpful.
Old 06-16-2018, 09:17 AM   #13
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,717

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by pan64 View Post
I think that should be there. somewhere.
https://support.mozilla.org/en-US/kb...-using-filters
Doh! Yes it is. ;-)
 
Old 06-16-2018, 10:59 AM   #14
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by linustalman View Post
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?
Nope. It's always been there. Some of my filters were created several years ago. I'm on version 52.6.0

Do I infer correctly that you've found them now?
 
1 members found this post helpful.
Old 06-16-2018, 11:13 AM   #15
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,717

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by scasey View Post
Nope. It's always been there. Some of my filters were created several years ago. I'm on version 52.6.0

Do I infer correctly that you've found them now?
Yes. I was initially looking in the wrong location.
 
  


Reply

Tags
delete emails, manually, thunderbird



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to force specific domain or user specific emails to proces in sendmail 8.13.5 FC5 peanutsa Linux - Newbie 1 03-22-2009 05:33 AM
Exporting emails w/ Thunderbird ZingSter SUSE / openSUSE 3 03-02-2005 07:54 AM
manually deleting users nukeu666 Linux - General 5 08-14-2004 07:32 AM
backing up thunderbird emails? webazoid Linux - Software 1 07-14-2004 03:43 PM
Backup Emails in Thunderbird IBall Linux - Software 1 02-17-2004 09:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration