4

The scenario is:

  • an IMAP server with little space (say 1GB)
  • quite a few IMAP clients (say 2 phones, 1 tablet, 3 PCs) with an email client such as Thunderbird 38.3 or later

What I'd like to achieve is this:

  1. all PCs clients should keep a full copy (not just the header) of messages
  2. all PCs clients should save locally any message deleted remotely (i.e. move full message to a local folder before deleting it from its own IMAP folder, as a result of syncronization)

This way one could save space on IMAP server while keeping a local copy of all (full) messages on each PC (provided that PC clients are syncronized when an email is deleted from a non-PC client -- avoiding deletion from non-PC clients could be a workaround to ensure that local copies are complete).

I found some related questions that address similar scenarios (like this and this), but none gives a solution to this question.

I believe that this is quite a common need, so I hope that some email client guru, hopefully Thunderbird, come up with a solution.

mmj
  • 171

4 Answers4

1

You can create a Thunderbird filter which moves messages from IMAP folders to local folders.

Anyway an "IMAP archiver and deleter" appears to be a strong need of the Internet Community since at least 10 years, don't know why no solution came out till now. I am currently working at mine here:

https://jumpjack.wordpress.com/2016/03/10/come-cancellare-migliaia-di-email-dai-server-libero-in-un-colpo-solo/

My final objectives are:

1) set up an excel workbook which automates the task of deleting bunch of messages and/or donwload them.

2) Convert such workbook to a standalong VBS script for those who do not have MS Office installed.

3) Create a PHP page which performs such task for everybody, regardless of Windows/Mac/Linux

I am at good point for first, the others are still to come.

In the meantime, here they are some useful commands to manually play with you IMAP server:

Connect:

telnet imap.xxxx.yyyy  143 -f log.txt

Login:

. login user pass

List available folders:

. list "" *

Go inside a folder:

. select foldername

Mark messages from 1 to 15 as deleted:

. store 1:15 +FLAGS \Deleted

They will disappear in quite-real-time from Outlook.

Undo above (minus sign):

. store 1:15 -FLAGS \Deleted

(They will come back visible in Outlook).

Move such messages to trash folder (else they are just invisible, not deleted):

. move 1:15 trash

Actually delete the messages:

. select trash
. expunge

You can also past all commands into the telnet window to get them executed:

. select inbox
. store 1:15 +FLAGS \Deleted
. move 1:15 trash
. select trash
. expunge

To avoid "blind deletion" you need to know what's inside those messages from 1st to 15th.

. fetch 1:15 ( flags body[header.fields (subject date)])
jumpjack
  • 465
1

You can use POP3 on your client's PC in place of IMAP or at least for one PC. POP3 by default download all emails and doesn't delete if the emails are deleted on server (doesn't do synchronization, only download email), so you can have all your mail downloaded locally and manually delete them if needed. here is the difference of this 2 protocols

Let the non-PC clients as IMAP because it is more handy with the synchronization and if some mails are deleted you can find them on the PC that uses POP3

ebilcari
  • 720
1

Until a better solution is found, I guess that the best workaround is to manually archive older messages when needed (e.g. when IMAP server quota limit is approaching). Of course you have to activate messages archiving to a local folder, for each IMAP account (this is necessary to make the "Archive" command button appear when you select messages).

I've also tried some add-on like Awesome Auto Archive and AutoarchiveReloaded, but both were unsatisfactory: the first gave me an error during configuration, the second is safer if run manually.

I hope some day Thunderbird will add a "simple" option for IMAP accounts able to automatically archive older messages when quota limit is approaching. I really wonder why such an important feature for IMAP accounts has not already been implemented.

mmj
  • 171
0

Whenever my IMAP inbox gets almost full, I use "archive" operation in Thunderbird to manually move e-mails from IMAP folders to local folders that I keep in Dropbox folder.

So I keep up to 1 GB of important/recent mails on the IMAP server (so it is available on my phone) and all other archived (or copied) e-mails in local folders are synced between PCs over Dropbox and available to all PCs with Thunderbird installed (or you may use portable versions also). (If you change archived e-mail status or tag, that is also synced immediately to all other instances.) Dropbox also gives you at least 30 days of version history for all the files in case anything goes wrong.

But keep in mind that Thunderbird still has a nasty IMAP move/archive bug that can cause data loss if you do not do move operation while in off-line mode: https://bugzilla.mozilla.org/show_bug.cgi?id=462156

So you should copy/verify/delete manually instead of doing move/archive.

broslav
  • 111