AquaMail Forum

English - Android => Bug reports => Topic started by: XabiX on February 22, 2016, 12:24:00 pm

Title: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 22, 2016, 12:24:00 pm
Hello,

I am not sure why but since quite some time my messages deleted in AquaMail Pro dissapear locally but not on the server.
I read the FAQ and tried to play with "EXPUNGE when deleting" but no difference.

The logs concern the email called "Oracle PartnerNetwork and email" from email2 (my yahoo account) which I deleted on my tablet and still appear on my yahoo account as read.

Any idea of the issue?. I read some post proposing to reinstall but not fan of such workarounds.

Merci
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 22, 2016, 12:39:31 pm
Sill on email 2, I have done a log to show the difference between email called test1 which was deleted with EXPUNGE option and email called test2 which was deleted without EXPUNGE.
Both were still listed in my yahoo mail GUI as read.

MERCI
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 22, 2016, 01:22:23 pm
Bonjour Paris!

Currently I have: Account options -> Deleting messages set to Move to Deleted folder first.
(maybe should I try Delete from the server immediately as workaround but would be better to have in the trash)

I also have "Remove deleted messages" ticked

In "Account Options" -> "Folder", I have added folder "Trash" from "Do not sync" to "Sync with Deleted folder"

I did the test again and it now WORKS !

Merci (I have removed the EXPUNGE options too as I didn't see any need to keep it)

XabiX
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 22, 2016, 01:29:22 pm
Last question!

It solved the issue of my yahoo account as there was a Trash folder. But on my corporate account, I don't see any Trash or Deleted folder. There is one called unwanted but not sure this would be good to sync.

How can i fix the deleted emails from my tablet then still being as read on the server? Should I just create a folder called Trash and "Sync with Deleted folder"?

Merci
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 22, 2016, 01:38:49 pm
Messages go to "Deleted Items" but this folder doesn't show in the Folder ones in AquaMail while all the others do. I deleted the unwanted one from outlook thus it disappeared in AquaMail too.

See requested pict
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 22, 2016, 01:55:42 pm
Actually this Outlook "Deleted Items" folder shows a location to my workspace starting with // and I can see it sync with my Zimbra webmail access with Trash name so on the server there is a Trash folder. That sounds strange as it's not listed in AquaMail some how.

Any idea? (I could not renamed the outlook folder to show the same names)
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 22, 2016, 03:00:11 pm
I tried many things and read some articles. It seems that there are issues with Outlook 2013 and 2016 together with the Deleted Items vs IMAP Trash sync. (It s working OK with Inbox, sent etc..; but seems that Trash appears differently in Outlook than just Trash)

Outlook is correctly sync between "Deleted Items" and Zimbra Trash (IMAP) folder. so when I delete one on one side it dissappears on the other one and vice versa but Trash folder doesn't appear in AquaMail. So I tried:

1/ To create a "Deleted Items" folder in Zimbra but appeared as "Deleted Items1" folder in Outlook so like a new folder. (so "Deleted Items1" would be link to "Deleted Items" in Zimbra but no interest)

2/ then I tried to create a Trash folder in outlook but this one didn't do anything on the Zimbra side but obviously appeared in AquaMail as a new folder (like any new folder being created unless that Trash exists already in Zimbra right). Then by curiosity, I synced this new Trash folder in AquaMail with Deleted folder.
I did then a new test, and the email deleted from AquaMail is moved to [Deleted] folder in AquaMail, this email dissappears from Zimbra but I don't know where it goes and then appears strike-through (barré) in outlook.

(will add a few picts after lunch)

Maybe the solution is to set a rule in Outlook that moves the strikethrough email directly to Deleted Items too.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 22, 2016, 03:59:14 pm
yes this was the article I read but unfortunately either Zimbra and/or my administrators don't provide this capability.

Is there any reason why the Trash IMAP server (shown in Zimbra) is not listed in AquaMail? that would solve the all issue as I would be able to sync it with the Deleted AquaMail folder!

See a few screenshots to illustrate what I see
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 22, 2016, 05:25:18 pm
not much I go up and down :). I added the top scree for you to see. There is like a black refresh halo coming but that doesn't seem to do anything.

Again if I had a new folder in outlook it does appear in this list so this seems working good. What I don't understand is why the Trash folder in IMAP is not retrieved.

Will that help if I get a debug file?

As I have limited options on the IMAP server side, I reside on the client to find a solution.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: Kostya Vasilyev on February 22, 2016, 10:05:28 pm
I think it's an issue with IMAP NAMESPACE (a server config issue, really).

Please try this:

- Long press the account -> account setup -> Manual
- On the incoming server settings screen, unselect "Folder prefix: automatic" and make sure there is nothing in the edit control below
- Press Next twice to try to validate and save
- The app should take you to Folders screen, if not, you already know how to get there (to Folders), you should see some changes

PS - just in case, I'd use Menu -> Backup & Restore first, to make a backup of your account and folder settings.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: StR on February 22, 2016, 11:25:14 pm
yes this was the article I read but unfortunately either Zimbra and/or my administrators don't provide this capability.

Is there any reason why the Trash IMAP server (shown in Zimbra) is not listed in AquaMail? that would solve the all issue as I would be able to sync it with the Deleted AquaMail folder!

See a few screenshots to illustrate what I see

Let me try to help you understanding how things work.
You have the Server that keep all mail and everything else (Zimbra, Outlook, Aquamail) communicate with the server, and sync the folders and messages with the server. Each of them have their own mapping.
And for the proper functionality, what matters is which folder is internally considered as "Trash/Deleted.." by the server, not the names per se. (So, creating new folders with those names would not do any good.)

Now, let me list together the facts from your postings.
1. Outlook is connected via IMAP to the server.
2. Outlook seems to sync the "Deleted Items" folder to the internal "Deleted/Trash" folder, because we see it showing up in "Trash" folder in Zimbra (which is configured by your sysadmins, and we hope that was done properly).

If all of this is correct, that suggests that the IMAP server does offer the "deleted/trash" folder via IMAP. Then it is a surprise that Aquamail sees all other server side folders, but not this one.

So, there are the following possibilities that could answer this contradiction:
1. Aquamail has a bug showing a folder. 
    (This is unlikely, because that part has been tested many times on many servers.)
2. The server has a bug that causes it not showing that folder exclusively to Aquamail.
    (This is possible, but not very likely either.)
3. You are not recognizing that folder in the long list of server-side folders (e.g. because it is named something else: "Deleted", "supprimé", or ...). 
    (This is not totally impossible, but unlikely at thist point...)
4. One of the connections (Outlook's or Aquamail's) is not set as IMAP, but rather as EWS (in Aquamail) or Activesync (in Outlook).

     If that's the case, it would mean that the server is not showing that folder via one of those two connections (possibly due to the server-side configuration or some weirdness..)
This is quite possible. So, - I suggest that you double check how your connection is set in both Outlook and Aquamail.
And then, maybe you can tell where "Deleted Items" is pointing in your Outlook settings? You wrote it starts with "//"  what's after that?
The name that comes after that may give some clues as for what is the actual name for that "deleted/trash" folder on the Server.

Besides this, you can save a debug log and send it to the developer, Kostya (see information at the signature below any of his postings.) He might have a more clear suggestion of how to capture that log, but I'd think this would do:
start the log, and enable to options that he requests in that description. Then go to "other folders" (e.g. from the pull-down "drawer" in the left-top corner), and let all folders load.
Then stop the debug log, and send the file as described in the instructions.

PS. I see that Kostya just has posted his response, - but I still think my suggestions might be helpful.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: Kostya Vasilyev on February 23, 2016, 12:31:43 am
Thank you StR, very useful.

You might be right about ActiveSync in Outlook -- and then the only other reference point we have is web mail, which may not be using any mail protocol but dealing directly with the account's mail database.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 23, 2016, 04:38:17 pm
I think it's an issue with IMAP NAMESPACE (a server config issue, really).

Please try this:

- Long press the account -> account setup -> Manual
- On the incoming server settings screen, unselect "Folder prefix: automatic" and make sure there is nothing in the edit control below
- Press Next twice to try to validate and save
- The app should take you to Folders screen, if not, you already know how to get there (to Folders), you should see some changes

PS - just in case, I'd use Menu -> Backup & Restore first, to make a backup of your account and folder settings.

Bonjour Kostya,

FYI I have tried this and it didn't work. I will try StR suggestion and report back.

Merci
XabiX
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 23, 2016, 04:57:23 pm
Thank you StR, very useful.

You might be right about ActiveSync in Outlook -- and then the only other reference point we have is web mail, which may not be using any mail protocol but dealing directly with the account's mail database.

Hi StR,

For completeness I have posted my Outlook config but from my understanding my outlook works fine and I have "Deleted Items" sync with IMAP server Trash folder and all is fine. What I need to "solve" is the mapping between AquaMail and my IMAP server that is from Oracle stbeehive. Settings are from: https://beehiveonline.oracle.com/External_02.html

Find enclosed the outook settings fyi together with the AquaMail ones
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 23, 2016, 05:11:43 pm
Hi guys,

I believe there is an issue as I can see the directory Trash being seen but is not listed furthermore the log
2016.02.23 15:04:24.639 +0100   [IMAP.251525]   Database folder: _id 7, Trash, type 4097

See attached log. Hopefully this helps.

XabiX (pwd my username in small letters)
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 23, 2016, 05:49:33 pm
No I am not. Zimbra doesn't offer this level of customization (or at least in our installed setup).

For Now I let the outlook aside as this works well, and I am trying to see why the Zimbra Trash folder doesn't get mapped with the folders listed in AquaMail. Hopefully the log can help.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: StR on February 23, 2016, 08:05:17 pm
Thank you StR, very useful.

You might be right about ActiveSync in Outlook -- and then the only other reference point we have is web mail, which may not be using any mail protocol but dealing directly with the account's mail database.

Hi StR,

For completeness I have posted my Outlook config but from my understanding my outlook works fine and I have "Deleted Items" sync with IMAP server Trash folder and all is fine. What I need to "solve" is the mapping between AquaMail and my IMAP server that is from Oracle stbeehive. Settings are from: https://beehiveonline.oracle.com/External_02.html

Find enclosed the outook settings fyi together with the AquaMail ones

XabiX:

Yes, we understand that your Outlook is working properly, and we are not trying to change anything in it. Rather, we are using all available information to find the reason why your Aquamail is not working. And your Outlook is one of the points of reference.

The information you posted is helpful.
First, from your Outlook settings, Outlook is not connecting to your server via IMAP, but rather via MAPI, which is an old MS protocol (I believe Exchange Web Services, aka EWS protocol was developed as a replacement for MAPI, but I have very limited knowledge of MS mail protocols, as I've never worked with them myself.

Second, - based on what you wrote, it looks like the server-side folder is indeed called "Trash". So, we now know that we are looking for that.

Third, let me guess, - for Zimbra interface, you are also using Oracle-based URL? Something like https://beehiveonline.oracle.com/zimbra , right? That tells us that Zimbra is using internal database and is not a point of reference for IMAP connection.

I didn't have a chance to look at the log file you posted. If I'll have time, I'll do that, - but in any case, Kostya should be able to see what's happening in that log.

In the mean time, please do, what Paris Geek suggested:
In Account options->Options and folders->Account options, enable "Display Other folders" (Montrer "Autres dossiers...")

Then, in Account list, tap on "Autres dossiers...." ("Other folders...") and post what you see there. Do you see "Trash" in the list?
Alternatively, you get the same list by going to "other folders" from the pull-down "drawer" in the left-top corner, and tell us if you see "Trash" on that list.

Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: StR on February 23, 2016, 08:25:47 pm
From the logs it looks like the server offers "Trash" folder. So, you should see it in the list when looking at "Other Folders", as described above.

Besides, - I just revisited the screenshots of your folders in Aquamail, and I didn't see "[Deleted]" folder there. It's possible that it was somewhere outside of what you captured with your screenshots. So, just in case, - do you see it?
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 24, 2016, 03:52:09 pm
Hi StR,

1/ As it seems you don't believe that there is no Trash, Deleted, Supprimé or whatever other folder listed in AquaMail here are all the captures of my folders.

2/ The webmail link is https://stbeehive.oracle.com/zimbra/

3/ From
In Account options->Options and folders->Account options, enable "Display Other folders" (Montrer "Autres dossiers...")
Then, in Account list, tap on "Autres dossiers...." ("Other folders...") and post what you see there. Do you see "Trash" in the list?
I tried that and refresh and no other folder is appearing in the Account options menu. I also checked from the pull down drawer and I get the exact same list plus a local "[Deleted]" folder which is the AquaMail one not sync/map as I can't find any folder to map it with.

Hope it helps, hopefully the log would help :D

Thanks
XabiX
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: StR on February 24, 2016, 11:25:51 pm
XabiX, yes both Paris Geek and I wanted to make sure that you are looking in the right place when you are saying there is no Trash folder.
It is not about you personally; it's just the complexity of the app functionality and options that can lead to a confusion and miscommunication. And knowing how technically savvy you might be, it is hard to guess.
(And as an excuse, let me mention that you did mix up MAPI and IMAP...)

Anyway, yes, the Trash folder doesn't show up, and I don't know why.
The log you posted does show that the server reports Trash. So, let's wait for Kostya to look at what is happening...
(I am not sure what "Dead folder" means in this log, it could be some function name/attribute or it might carry some important meaning in this case.)
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 24, 2016, 11:51:26 pm
Thank you so much for all your hard work and active support.

Should we 'ping' Kostya to make him aware of the issue, meaning that we believe there could something wrong happening between the IMAP server and AquaMail as per the log and your analysis too?

Thanks
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: mikeone on February 25, 2016, 12:02:33 am
Thank you so much for all your hard work and active support.

Should we 'ping' Kostya to make him aware of the issue, meaning that we believe there could something wrong happening between the IMAP server and AquaMail as per the log and your analysis too?

Thanks
Hi XabiX,
I'm pretty sure that Kostya is aware of this issue... and maybe already working on it  8)
Therefore it shouldn't be necessary to 'ping' him.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on February 25, 2016, 12:48:00 am
Thank You then I will wait !

Like your avatar by the way!
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: mikeone on February 25, 2016, 12:50:46 am
Like your avatar by the way!
Thanks 8) 8)
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: Kostya Vasilyev on February 25, 2016, 04:13:31 pm
This is the folder list returned by the server.

Call me blind, but I don't see anything like "Trash" or "Deleted" or "Bin" or "Deleted Items" here.

2016.02.23 15:04:24.659 +0100   [IMAP.251525]   Sending: kman52 LIST "" "*"
2016.02.23 15:04:24.907 +0100   [IMAP_RAW.251525]   Data is <1315>:
* LIST () "/" "Drafts"
* LIST () "/" "INBOX"
* LIST () "/" "INBOX/A&-C"
* LIST () "/" "INBOX/Active VARs"
[ ... redacted ... ]
* LIST () "/" "INBOX/Admin"
* LIST () "/" "INBOX/Other VARs"
[ ... redacted ... ]
* LIST () "/" "INBOX/People"
* LIST () "/" "INBOX/Products"
* LIST () "/" "Journal Archive"
* LIST () "/" "Junk E-mail"
* LIST () "/" "Notes"
* LIST () "/" "Oracle"
* LIST () "/" "RSS Feeds"
* LIST () "/" "Sent Items"
* LIST () "/" "Unwanted"
kman52 OK LIST completed


Now if you used K9 Mail, it would create a folder called Trash -- which I think is the wrong thing to do, because then you'd get "my Trash folder is out of sync wrt. Outlook and web mail".

If you can't get your admins to fix this for you -- it's entirely possible to create a folder for AquaMail's use as Trash, in web mail or in the app. It won't be the same folder as in Outlook or web mail, though.

Oh, and the command:

LIST "" "*"


means "give me all the folders you've got", there is no filtering or anything.

And as you can see, the server did report "Sent Items" and "Drafts" just fine.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: Kostya Vasilyev on February 25, 2016, 04:16:49 pm
And this:

Dead folder: [Trash id = 7 type = 4097

means that at some point, the server did report a folder called Trash and the app remembered -- but at this time, it's not present on (reported by) the server.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: StR on February 25, 2016, 07:31:53 pm
And this:

Dead folder: [Trash id = 7 type = 4097

means that at some point, the server did report a folder called Trash and the app remembered -- but at this time, it's not present on (reported by) the server.

Kostya,
I see...
Let me propose  a guess here:
XabiX wrote earlier that while testing he tried to create folders "Trash" and "Deleted items" (in Outlook and Zimbra, respectively). So, I suspect that Aquamail had caught that moment when "Trash" existed, - and cached it, and now "reporting" it. (Along with a few other deleted folders, inlcuding "test", "Sent", and a bunch of folders inside INBOX/Active VARs .



@Xabix:
One more wild guess: I see the folder "Unwanted Items".
Did you create that item yourself?
Could that be the internal name of the "Trash"?
Does "Unwanted Items" show in Outlook and Zimbra as a separate folder?

If it does not, - you can try choosing that folder to "sync to [Deleted]" in Aquamail, and then see
if by any chance deleting message in Aquamail (I assume you have "delete" function configured as "Move to [Deleted]".) would result in that deleted message showing in "Deleted items" in Outlook or in "Trash" in Zimbra.

Rather than this (very unlikely case), - as Kostya suggested, you should talk to your admins, asking how to make the server-side "Trash"  folder visible via IMAP interface.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: Kostya Vasilyev on February 25, 2016, 11:04:20 pm
Re: So, I suspect that Aquamail had caught that moment when "Trash" existed, - and cached it

Yes, this is possible. But now there is no Trash on the server.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: Kostya Vasilyev on February 25, 2016, 11:19:36 pm
Quote
Probably there but not visible. There should be a way, on the server, to make Trash visible in IMAP mode. I think that we all agree on that.

There is no such thing -- there simply is no such folder, as far as IMAP goes, as evidenced by the debug log excerpt, above.

Maybe there is a setting in this web mail, just like there is in Gmail web mail, for "show over IMAP or not".

Just a terminology nitpick.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on March 09, 2016, 04:13:42 pm
Hi guys,

Sorry for the late response, as I was on holidays :)

You guys are right, I did try creating manually a Trash folder which explains why AquaMail could remember it. Unfortunately my company and admins will not change anything for me and no options as such are provided through my webmail access!

I re-activated my Email app from my Samsung phone and deleted/moved messages and it worked. They are sent to a new created Trash folder. Wich is fine and therefore I have reuse this one to sync AquaMail with this Trash folder ("Move to [Deleted]") but the issue is:

if I delete an email from Email app it gets DELETED and moved to Trash folder but if I delete it with AquaMail it doesn't dissapear it gets strikethrought (see screenshot)

My big issue with AquaMail is that whether I delete or move emails on my company email account they don't move on the server (and outlook) and they all stay strikethrought so I have to do things twice (phone and then PC) while it doesn't happen with Email app.

Attached a log when I delete an email called "Test 3" from AquaMail to see if an issue can be spotted or a configuration mismatch.

MERCI
XabiX
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: Kostya Vasilyev on March 11, 2016, 01:28:08 am
Re: long story about Trash folder

Yep, creating the folder yourself is what was suggested a few messages up.

You didn't have to use Samsung's mail app for it, it would have worked from AquaMail or web mail too (but you probably thought that Samsung's app would magically find something which said was not there... and it did not...)

Re: they all stay strikethrought

Long press the account in AquaMail -> options and folders -> IMAP options -> make sure to enable "EXPUNGE"

It is enabled by default, I'm guessing you might have turned it off while experimenting.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: XabiX on March 11, 2016, 12:56:25 pm
Excellent this works. The Expunge option was disabled as part of my testing.

Now I got it working back as in the past but with 2 Deleted folders:

one in Outlook called "Deleted items" sync with my webmail folder called Trash, and
another one in Outlook called "Trash" which I couldn't find in my webmail but that's fine.

I end up with 2 folders (as before) but that's OK and now I know why this happens and is inline with other clients so it's an admin config issue on the server.

Do you guys think that if Outlook would have been setup in IMAP vs MAPI this would have been different?

At least I got it back working as before and wanted to thanks all the community for the quick and deep support provided.
Title: Re: IMAP messages not deleted but marked as read (used to work)
Post by: Kostya Vasilyev on March 13, 2016, 03:46:12 pm
Re: Do you guys think that if Outlook would have been setup in IMAP vs MAPI this would have been different?

I think it would be.

Outlook would also not be able to see something that's not there -- the Trash folder in the folder list returned over IMAP.

PLEASE understand that there is nothing magical here.

Your mail server does not report the existence of the Trash folder over IMAP -> end of story, no matter what the mail app.