Author Topic: Gmail - Deleted Folder Sync  (Read 12044 times)

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Gmail - Deleted Folder Sync
« on: January 31, 2016, 09:56:25 pm »
I apologize if this has already been discussed. I did search the forums and did a lot of reading/testing before posting.

First the preliminaries: Aquamail is brilliant! It has made managing (not just reading) email on android both possible and enjoyable. The following inquiry in no way represents dissatisfaction with the app. It is simply a question/request that would help me - and possibly benefit others.

Is is possible to set the Trash folder in AquaMail to sync with Gmail's '[Deleted]' folder on demand vs automatically? This can be done with the Spam and Archive folders but not Deleted, Drafts or Sent.

As currently configured the automatic Trash <-> Deleted sync is the most time consuming/expensive part of a normal sync operation. I have far more deleted items than those in the Inbox or other auto-synced folders. By default Gmail retains deleted items for 30 days. I can manually prune the folder by that's a largely manual operation as there is no native setting or automated way to accomplish this.

I do want to retain the Trash <-> Deleted relationship in AquaMail as there are times I need to reference something that has been recently deleted from a different client. I am more than happy to do a manual refresh to retrieve these items but don't want to maintain separate folders on the server and AM sides.

Thanks in advance for your thoughts.

p.s. Setting the "Message to keep" parameter on the Trash folder appears to be a minimum value (which makes sense for its intended purpose).
« Last Edit: February 01, 2016, 06:42:01 am by Davey126 »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Gmail - Deleted Folder Sync
« Reply #1 on: February 02, 2016, 10:01:27 pm »

1 - "Special" folders (Sent / Deleted / Drafts) are always "synced" (for IMAP / Exchange accounts)

2 - Moving to Deleted ([Gmail]/Trash) is the only proper way to delete messages in Gmail (I mean to remove all labels, and also from All Mail)

Now you can try to bring up the account's Options and Folders (long press) -> Folders -> Find [Gmail]/Trash, tap it and choose "Do not sync".

Then the app will use its own local folder for Deleted, and message won't be moved anywhere on the server (when you move there in the app) -- until you long press this folder and "delete all" at which point those messages will be deleted from Inbox or whatever.

This however is a highly unusual way to set up Gmail, and I can't promise that there won't be any unexpected side effects.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Gmail - Deleted Folder Sync
« Reply #2 on: February 03, 2016, 01:47:48 am »
Thank you for the extensive response. Before posting I had found/experimented with the "Do Not Sync" option, noted the behaviors that you describe and decided the benefits did not outweigh the disadvantages.

I spent (perhaps too much) time observing detailed sync operations over the past few days and concluded that syncing my busy 'trash' folder is not that expensive after all. The initial sync takes some time/resource (of course) but even with a 100+ items coming/going daily incremental syncs happen quickly with relatively little cpu. Apparently Aquamail is smart about the remaining 3,000 or so items in the deleted folder that have not changed and spends little/no time considering them.

Not sure who gets the efficiency nod on this one; since Google isn't in the room it goes to Kostya and Aquamail!

This is a case were dialog is good, a solution already in place and no further action needed. Thanks again for producing such a nice client along with time you devote to servicing the forums and user Q&A.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Gmail - Deleted Folder Sync
« Reply #3 on: February 03, 2016, 01:55:23 am »
Re: Apparently Aquamail is smart about the remaining 3,000 or so items in the deleted folder that have not changed and spends little/no time considering them

Yes, AquaMail only loads a limited number of recent messages per folder. The relevant setting is called "messages to sync".

It would be crazy to download all 12,000 messages in my Inbox and 14,000 in another folder -- and I know there are people who keep many more messages in their accounts.

Re: Not sure who gets the efficiency nod on this one; since Google isn't in the room it goes to Kostya and Aquamail!

It's AquaMail (I do know how this works).

Google could make it even better, by making a certain something work more like it does with certain other IMAP servers (e.g. Dovecot or Cyrus)... but it doesn't.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Gmail - Deleted Folder Sync
« Reply #4 on: February 03, 2016, 04:56:41 am »
I have a related question that hopefully will complete the sync picture and perhaps help others who discover this thread.

At present I have "messages to sync" and "messages to cache" set to '30 days' and '250 messages' under Account options. This works very well for my use case on Gmail. Fast response (quick sync), small database, fully populated conversations within the 30 day sync horizon. Perfect.

I recently encountered the same settings under Settings -> Mail, receiving but found the values to be "25 messages" and "250 messages", respectfully. It is likely I set these values sometime in the past and forgot about them.

How is this apparent conflict handled by AquaMail? In particular "Messages to sync" which (in my case) is expressed as calendar days in one location and message count in another. I could set them to identical values and walk away ... but curiosity has set in.

I did spend a bit of time reviewing previous forum posts dealing with sync. Sorry if I missed an obvious answer.

Brief response is fine. Just want to make sure I do not need to make further tweaks or have set myself up for weird behavior. I will try not to extend this thread further...nothing more annoying than a series of follow-up questions! :)

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Gmail - Deleted Folder Sync
« Reply #5 on: February 04, 2016, 01:07:46 am »
Account level settings have higher priority, so you're getting "30 days worth of messages fully up to date + 250 more messages cached".

( when using a date range "messages to sync", the "messages to cache" means "in addition to..." because I can't tell how many messages "30 days" is exactly )
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Gmail - Deleted Folder Sync
« Reply #6 on: February 04, 2016, 04:53:57 am »
Thanks. That's what I thought might be happening w/sync based on observation. Good to know about the behavior of cache in this situation. Works well for my purposes. Happy camper :)

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Gmail - Deleted Folder Sync
« Reply #7 on: February 06, 2016, 12:05:25 am »
Account level settings have higher priority, so you're getting "30 days worth of messages fully up to date + 250 more messages cached".

( when using a date range "messages to sync", the "messages to cache" means "in addition to..." because I can't tell how many messages "30 days" is exactly )
A quick one-time observation that may not be relevant or repeatable. Posting here for reference in case it happens again (to me or someone else).

Using Gmail with account sync setting as described above. Left other sync settings (under settings -> mail receiving) at their default values. Encountered a situation were the contents of my inbox in Aquamail did not match that of the web client. Messages in question arrived within past 24 hours. Fiddled with various settings to no avail. On a whim bumped 'messages to sync' to 5000 under 'normal' settings (not account). After the next sync everything was back to normal.

I have not seen this before nor have I been able to replicate it in the few hours since it was observed. Will continue monitoring and report back if new information becomes available.

Note: Not a conversation combining issue; accounted for that.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Gmail - Deleted Folder Sync
« Reply #8 on: February 06, 2016, 12:08:45 am »
Hmm, you're still using "Last 30 days" for "Messages to sync", correct?

This actually asks the serves to search for messages by this date range and loads those.

If this happens again, please capture the issue in the app's debug log if you can (the link is in my signature, below).

Just enable logging, mark a single message with a star on / off (to force a change in the account) and then "Refresh".
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Gmail - Deleted Folder Sync
« Reply #9 on: February 06, 2016, 12:18:47 am »
Hmm, you're still using "Last 30 days" for "Messages to sync", correct?

This actually asks the serves to search for messages by this date range and loads those.

If this happens again, please capture the issue in the app's debug log if you can (the link is in my signature, below).

Just enable logging, mark a single message with a star on / off (to force a change in the account) and then "Refresh".
Correct (30 days on account options). I will try to capture a log if it reoccurs. Shouldn't be too hard as the issue is not fleeting; requires an action to rectify so there is time to enable debugging.

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Gmail - Deleted Folder Sync
« Reply #10 on: February 12, 2016, 10:07:01 pm »
A couple follow-ups:

1) I have not been able to duplicate the one-time problem discussed in the three posts (dated Feb 06) immediately preceding this one. I view the issue as unrepeatable and therefore closed.

2) I would like to resurrect the original request as a low-priority/nice-to-have/only-if-easy-to-implement enhancement:

Is is possible to set the Trash folder in AquaMail to sync with Gmail's '[Deleted]' folder on demand vs automatically? This can be done with the Spam and Archive folders but not Deleted, Drafts or Sent.

Rational: for most users Spam and Trash represent different variations in the same general category: unwanted items that *may* need to be accessed on occasion. Spam has the option to sync on demand; Trash always Syncs. It seems silly to maintain 3000+ unwanted emails on the local device when they are rarely needed/accessed. The collection makes up 80% of my mail database. Gmail has made it difficult to prune these items in bulk on the server side so users are bound by the default (unconfigurable) 30 day expiration interval. Culling the trash folder from AquaMail leads to very long sync times (many minutes for a few hundred items) which I understand and do not view as a 'bug' as this is not the way things are normally done.

It is important to acknowledge that AquaMail efficiently handles the normal syncing of 'deleted' items as discussed in previous posts within this thread. It's not about raw performance. More of a logical, consistency thing that might lead to a smaller local database for some.
« Last Edit: February 12, 2016, 10:22:38 pm by Davey126 »

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Gmail - Deleted Folder Sync
« Reply #11 on: February 12, 2016, 10:20:43 pm »
I agree with Davey126 and support that idea!
( I am not affected much, as my Gmail usage is minimum.)

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Gmail - Deleted Folder Sync
« Reply #12 on: February 12, 2016, 11:12:01 pm »
Thanks for the suggestion but it is not that easy. I delete dozens of messages every day with no intent of ever accessing them again. Otherwise they wouldn't have been deleted, either remaining in the inbox or moved to a pending folder.

Then comes the unexpected need to view/act on the content again. Off to the deleted folder for a search ...

I really do not want to engage in a discussion of 'best practice'. I'm quite familiar with the capabilities of Gmail and IMAP/POP clients. I also appreciate AquaMail and the thoughtful decisions that have been made around how it operates. Like all enhancement requests the decision to implement comes down to what the developer chooses to do based on user feedback.

Your post and mind contribute to that equation.

Davey126

  • Sr. Member
  • ****
  • Posts: 258
Re: Gmail - Deleted Folder Sync
« Reply #13 on: February 12, 2016, 11:19:42 pm »
And justification for such a claim? Could be I have overlooked a peril. Please enlighten the community so we all understand the danger.

Edit: Previous post (which I failed to quote) that I was responding to was subsequently amended so this follow-up does not make complete sense in the flow of the conversation. Leaving original wording intact.
« Last Edit: February 13, 2016, 05:20:39 am by Davey126 »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Gmail - Deleted Folder Sync
« Reply #14 on: February 12, 2016, 11:26:02 pm »
Quote
It is important to acknowledge that AquaMail efficiently handles the normal syncing of 'deleted' items as discussed in previous posts within this thread. It's not about raw performance. More of a logical, consistency thing that might lead to a smaller local database for some.

Give what you wrote above (quoted) -- is this a real issue for you, are you seeing any negative effects of Trash "syncing"?

How large is the app's database, anyway, on your phone? It's listed in the app's About window.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/