![]() Registered Member ![]()
|
Hello,
Is there an option to delete an email but keep a local copy only locally? I would like to remove emails older than a year from the email supplier (Gmail, Yahoo) etc. but keep a local archive that I can still browse and search through KMail if I need to. Is this possible? Ideally this would be using the same account, maybe with old emails stored on a separate folder, with IMAP ignoring this folder when synchronising with the remote. Otherwise, creating a separate account, downloading the emails, then disassociating the account with the email provider so that it doesn't sync and deleting the emails, may work? It will be difficult re-archive on the same account 1 year later though. |
![]() KDE Developer ![]()
|
Hi,
we can't really keep emails locally inside an account if they no longer exist on the server. The best we can do is to move expired emails to a different account - for example a local maildir or mbox resource. You can add a new maildir resource in KMail settings, or you can just use the existing "Local Folders" account. You can create an "Archive" subfolder there, or anything that works for you, Then right-click a folder on the IMAP account that you want emails from to be archived after some time, choose "Folder Properties" and go to "Expiry" tab. Enable one (or both) of the checkboxes there, configure the expiration period (i.e. after how long after receiving the email the email should be expired) and select "Move expired messages to" and choose a folder in the newly created maildir resource (or the "Local Folders" account) that you want the expired messages to be moved to. This way the message will be removed from the remote server and will be only stored locally, although in a different "account". There is no need to associate the maildir resource with any email account.
Daniel Vrátil | www.dvratil.cz | dvratil@kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde) |
![]() Registered Member ![]()
|
Hi and thanks for the response.
That would do the job well ... if only it worked! Thankfully I was insightful enough to test it on an account that I do not actively use and I had taken a backup, otherwise it would have been a disaster. Details: - I'm on a clean installation of Fedora 23, with Kmail 4.14.10 according to Help -> About Kmail. - I created a folder in Local Folders -> Archives -> email -> Inbox. - I right-clicked on the Inbox folder of the original account and selected Folder Properties. Navigated to the Expiry tab, set both read and unread messages to expire after 365 days, set Move expired messages to the newly created folder. Clicked "Save Settings and Expire Now". - Emails older than a year from today disappeared, and they have been removed from the remote account as well - all as expected. However, the emails are now nowhere to be found. The newly created folder is just empty. Is it possible that there is a bug that uses the "Delete expired messages permanently" option, even though the "Move expired messages to"? |
![]() Administrator ![]()
|
If you can create a minimal test case that always manifests the problem, please file a bug report (severity "critical" as it's data loss).
"Violence is the last refuge of the incompetent."
![]() Plasma FAQ maintainer - Plasma programming with Python |
![]() Registered Member ![]()
|
Hello,
The results showed up on the archive folder after a couple of weeks or so. Apparently they were being processed in the background or something. It contained emails from quite a few years, even though not so many emails. On another test where I selected the archive expiry date so that it picks up only 2 emails, the emails showed up immediately. I will still try to verify if all emails are there, as they seem too few to me (only 616 emails showed up, I was expecting more). Since they have been removed from the original IMAP server (Yahoo), I'll have to restore from a backup and check - I'll report if there is any problem when I do that. It would be great to understand how this works though. The emails were immediately removed from the original server and the original Kmail account, but they showed up on the archive folder at least a couple of weeks later. Why was that? That was really confusing, I would still consider it a bug and if what's causing it can't be resolved there should certainly be a notice displayed to the user. Any ideas, before I raise a bug? |
![]() Administrator ![]()
|
I would suggest you to file one anyway, with detailed steps on how to trigger it. Please post the bug number here afterwards.
"Violence is the last refuge of the incompetent."
![]() Plasma FAQ maintainer - Plasma programming with Python |
![]() Registered Member ![]()
|
I have encountered this again when trying to archive an IMAP folder into a local folder. I have logged a bug: https://bugs.kde.org/show_bug.cgi?id=362896
|
![]() Registered Member ![]()
|
It seems that this happens when having a slow internet connection. I have updated the bug with more information. Solution at the moment would be to manually expire emails in small chunks when first configuring the expiration e.g. 100 days at the time, until you reach the desired date. From then on emails should automatically expire regularly in so the issue shouldn't be encountered.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]