Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete mail action does not move to Trash but deletes permanently #6774

Closed
2 tasks done
gekoke opened this issue Mar 21, 2023 · 13 comments
Closed
2 tasks done

Delete mail action does not move to Trash but deletes permanently #6774

gekoke opened this issue Mar 21, 2023 · 13 comments
Labels
type: bug Something is causing incorrect behavior or errors

Comments

@gekoke
Copy link

gekoke commented Mar 21, 2023

Checklist

  • I have used the search function to see if someone else has already submitted the same bug report.
  • I will describe the problem with as much detail as possible.

App version

6.510

Where did you get the app from?

F-Droid

Android version

Oxygen OS 11.2.10.10.LE25BA

Device model

OnePlus 9

Steps to reproduce

  1. Load the following config:
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<k9settings version="87" format="1">
  <global>
    <value key="animations">true</value>
    <value key="backgroundOperations">ALWAYS</value>
    <value key="changeRegisteredNameColor">false</value>
    <value key="confirmDelete">false</value>
    <value key="confirmDeleteStarred">false</value>
    <value key="confirmSpam">false</value>
    <value key="confirmMarkAllRead">true</value>
    <value key="enableDebugLogging">false</value>
    <value key="enableSensitiveLogging">false</value>
    <value key="fontSizeMessageComposeInput">medium</value>
    <value key="fontSizeMessageViewAdditionalHeaders" />
    <value key="fontSizeMessageViewCC" />
    <value key="fontSizeMessageViewTime" />
    <value key="language">default</value>
    <value key="messageListPreviewLines">2</value>
    <value key="messageListStars">true</value>
    <value key="messageViewFixedWidthFont">false</value>
    <value key="messageViewReturnToList">false</value>
    <value key="messageViewShowNext">true</value>
    <value key="quietTimeEnabled">false</value>
    <value key="quietTimeEnds">7:00</value>
    <value key="quietTimeStarts">21:00</value>
    <value key="registeredNameColor">#1093f5</value>
    <value key="showContactName">false</value>
    <value key="showCorrespondentNames">true</value>
    <value key="showUnifiedInbox">true</value>
    <value key="sortTypeEnum">SORT_DATE</value>
    <value key="sortAscending">false</value>
    <value key="theme">follow_system</value>
    <value key="messageViewTheme">use_global</value>
    <value key="useVolumeKeysForNavigation">false</value>
    <value key="useBackgroundAsUnreadIndicator">true</value>
    <value key="threadedView">true</value>
    <value key="splitViewMode">NEVER</value>
    <value key="messageComposeTheme">use_global</value>
    <value key="fixedMessageViewTheme">true</value>
    <value key="showContactPicture">true</value>
    <value key="autofitWidth">true</value>
    <value key="colorizeMissingContactPictures">true</value>
    <value key="messageViewDeleteActionVisible">true</value>
    <value key="messageViewArchiveActionVisible">false</value>
    <value key="messageViewMoveActionVisible">false</value>
    <value key="messageViewCopyActionVisible">false</value>
    <value key="messageViewSpamActionVisible">false</value>
    <value key="fontSizeMessageViewContentPercent">100</value>
    <value key="hideUserAgent">true</value>
    <value key="hideTimeZone">false</value>
    <value key="lockScreenNotificationVisibility">EVERYTHING</value>
    <value key="confirmDeleteFromNotification">false</value>
    <value key="messageListSenderAboveSubject">false</value>
    <value key="notificationQuickDelete">ALWAYS</value>
    <value key="notificationDuringQuietTimeEnabled">true</value>
    <value key="confirmDiscardMessage">true</value>
    <value key="pgpInlineDialogCounter">0</value>
    <value key="pgpSignOnlyDialogCounter">0</value>
    <value key="fontSizeMessageViewBCC" />
    <value key="showRecentChanges">true</value>
    <value key="showStarredCount">false</value>
    <value key="swipeRightAction">Archive</value>
    <value key="swipeLeftAction">Delete</value>
    <value key="showComposeButtonOnMessageList">true</value>
    <value key="messageListDensity">Relaxed</value>
  </global>
  <accounts>
    <account uuid="f1788e40-66dd-4892-a43d-988e420624ea">
      <name>REDACTED</name>
      <incoming-server type="IMAP">
        <host>imap.fastmail.com</host>
        <port>993</port>
        <connection-security>SSL_TLS_REQUIRED</connection-security>
        <authentication-type>PLAIN</authentication-type>
        <username>REDACTED@REDACTED</username>
        <extra>
          <value key="autoDetectNamespace">true</value>
          <value key="pathPrefix"></value>
        </extra>
      </incoming-server>
      <outgoing-server type="SMTP">
        <host>smtp.fastmail.com</host>
        <port>465</port>
        <connection-security>SSL_TLS_REQUIRED</connection-security>
        <authentication-type>PLAIN</authentication-type>
        <username>REDACTED</username>
      </outgoing-server>
      <settings>
        <value key="alwaysShowCcBcc">false</value>
        <value key="archiveFolderSelection">AUTOMATIC</value>
        <value key="autocryptMutualMode">false</value>
        <value key="automaticCheckIntervalMinutes">1440</value>
        <value key="chipColor">#039be5</value>
        <value key="defaultQuotedTextShown">true</value>
        <value key="deletePolicy">DELETE</value>
        <value key="displayCount">0</value>
        <value key="draftsFolderSelection">AUTOMATIC</value>
        <value key="expungePolicy">EXPUNGE_IMMEDIATELY</value>
        <value key="folderDisplayMode">ALL</value>
        <value key="folderNotifyNewMailMode">ALL</value>
        <value key="folderPushMode">ALL</value>
        <value key="folderSyncMode">ALL</value>
        <value key="folderTargetMode">ALL</value>
        <value key="idleRefreshMinutes">12</value>
        <value key="ignoreChatMessages">false</value>
        <value key="localStorageProvider">InternalStorage</value>
        <value key="markMessageAsReadOnDelete">true</value>
        <value key="markMessageAsReadOnView">true</value>
        <value key="maximumAutoDownloadMessageSize">0</value>
        <value key="maximumPolledMessageAge">-1</value>
        <value key="messageFormat">HTML</value>
        <value key="messageFormatAuto">false</value>
        <value key="messageReadReceipt">false</value>
        <value key="notificationLight">Disabled</value>
        <value key="notifyContactsMailOnly">false</value>
        <value key="notifyMailCheck">true</value>
        <value key="notifyNewMail">true</value>
        <value key="notifySelfNewMail">false</value>
        <value key="openPgpEncryptAllDrafts">false</value>
        <value key="openPgpEncryptSubject">false</value>
        <value key="openPgpHideSignOnly">false</value>
        <value key="quotePrefix">&gt;</value>
        <value key="quoteStyle">PREFIX</value>
        <value key="remoteSearchFullText">false</value>
        <value key="remoteSearchNumResults">25</value>
        <value key="replyAfterQuote">false</value>
        <value key="ring">true</value>
        <value key="ringtone">content://settings/system/notification_sound</value>
        <value key="searchableFolders">ALL</value>
        <value key="sentFolderSelection">AUTOMATIC</value>
        <value key="showPicturesEnum">NEVER</value>
        <value key="signatureBeforeQuotedText">false</value>
        <value key="sortAscending">false</value>
        <value key="sortTypeEnum">SORT_DATE</value>
        <value key="spamFolderSelection">AUTOMATIC</value>
        <value key="stripSignature">true</value>
        <value key="subscribedFoldersOnly">false</value>
        <value key="syncRemoteDeletions">true</value>
        <value key="trashFolderSelection">MANUAL</value>
        <value key="uploadSentMessages">true</value>
        <value key="useCompression">true</value>
        <value key="vibrate">false</value>
        <value key="vibratePattern">0</value>
        <value key="vibrateTimes">5</value>
        <value key="autoExpandFolderName">INBOX</value>
        <value key="archiveFolderName">Archive</value>
        <value key="draftsFolderName">Drafts</value>
        <value key="sentFolderName">Sent</value>
        <value key="spamFolderName">Spam</value>
        <value key="trashFolderName">Trash</value>
      </settings>
      <identities>
        <identity>
          <name>REDACTED</name>
          <email>REDACTED@REDACTED</email>
          <description>Initial identity</description>
          <settings>
            <value key="signature">-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.</value>
            <value key="signatureUse">false</value>
          </settings>
        </identity>
      </identities>
      <folders>
        <folder name="INBOX">
          <value key="integrate">true</value>
          <value key="inTopGroup">false</value>
          <value key="syncMode">FIRST_CLASS</value>
          <value key="displayMode">FIRST_CLASS</value>
          <value key="notifyMode">FIRST_CLASS</value>
          <value key="pushMode">FIRST_CLASS</value>
        </folder>
        <folder name="Archive">
          <value key="integrate">false</value>
          <value key="inTopGroup">false</value>
          <value key="syncMode">NO_CLASS</value>
          <value key="displayMode">FIRST_CLASS</value>
          <value key="notifyMode">INHERITED</value>
          <value key="pushMode">SECOND_CLASS</value>
        </folder>
        <folder name="Drafts">
          <value key="integrate">false</value>
          <value key="inTopGroup">false</value>
          <value key="syncMode">NO_CLASS</value>
          <value key="displayMode">FIRST_CLASS</value>
          <value key="notifyMode">INHERITED</value>
          <value key="pushMode">SECOND_CLASS</value>
        </folder>
        <folder name="Sent">
          <value key="integrate">false</value>
          <value key="inTopGroup">false</value>
          <value key="syncMode">NO_CLASS</value>
          <value key="displayMode">FIRST_CLASS</value>
          <value key="notifyMode">INHERITED</value>
          <value key="pushMode">SECOND_CLASS</value>
        </folder>
        <folder name="Spam">
          <value key="integrate">false</value>
          <value key="inTopGroup">false</value>
          <value key="syncMode">NO_CLASS</value>
          <value key="displayMode">FIRST_CLASS</value>
          <value key="notifyMode">INHERITED</value>
          <value key="pushMode">SECOND_CLASS</value>
        </folder>
        <folder name="Trash">
          <value key="integrate">false</value>
          <value key="inTopGroup">false</value>
          <value key="syncMode">NO_CLASS</value>
          <value key="displayMode">FIRST_CLASS</value>
          <value key="notifyMode">INHERITED</value>
          <value key="pushMode">SECOND_CLASS</value>
        </folder>

      </folders>
    </account>
  </accounts>
</k9settings>
  1. Navigate to any email not in the designated Trash folder
  2. Perform a swipe gesture or open the email an tap the trash icon to delete the email

Expected behavior

The email the delete operation was performed on is moved to the Trash folder.

Actual behavior

The email is permanently deleted both on the client and on the mail server.

Logs

Deleting an email:
k9mail-logs.txt

@gekoke gekoke added the type: bug Something is causing incorrect behavior or errors label Mar 21, 2023
@cketti
Copy link
Member

cketti commented Mar 21, 2023

The log doesn't contain any delete operations.

From your description it sounds like there's no Trash folder configured. Can you check the value of Settings → [Account] → Folders → Trash folder?

Importing the settings you have posted should have properly set the Trash folder. If that didn't work, it's a bug in the import code, not the delete code.

Side note: You should never enable push for all folders. Please see https://docs.k9mail.app/en/current/settings/push/

@cketti cketti added the status: needs information Needs more information to proceed label Mar 21, 2023
@gekoke
Copy link
Author

gekoke commented Mar 21, 2023

Yes, the settings state is as expected and a Trash folder is configured.

Apologies about the logs, I might have messed that up - I'll provide updates in due time.

@vdbhb59
Copy link

vdbhb59 commented Mar 23, 2023

I face the same issue, especially with Yahoo emails. I never noticed it, until I read this issue yesterday, and I tried to keep a tab. This happens with me as well. Also, something odd, when using Posteo accounts, or even Disroot emails, the deleted messages get moved back to Inbox after few minutes, at times even as less as a minute.

How do I capture this issue to raise here?

@cketti
Copy link
Member

cketti commented Mar 28, 2023

@vdbhb59: See https://github.com/thundernest/k-9/wiki/LoggingErrors

@fereshtehamiri
Copy link

@vdbhb59
Hello Dear
I have been trying to reproduce the issue you described ((in Samsung A32, Android 13)), but I am having difficulty doing so. I was wondering if you could provide me with more information on the scenario you experienced in order to help us resolve the issue.

Specifically, could you please provide me with more details on how to reproduce the issue, as well as any other information that could be helpful in diagnosing and fixing the bug?

could you attach a picture or video for this scenario?

Your assistance in this matter would be greatly appreciated.

Thank you for your time.

@KomtGoed
Copy link

Confirming this bug, for version 6.602

Trash folder is correctly set in the settings.
Tested with a message in the junk folder that is deleted (that's how I noticed with a live message).
See attached log file, hope it helps.

Thanks for looking into this, much appreciated.

k9mail-logs.txt

@cketti
Copy link
Member

cketti commented Jul 29, 2023

The behavior regarding messages deleted from the spam folder is intentional. See #6298.

@KomtGoed
Copy link

Thanks for pointing this one out. I'm afraid though that it is three shortcomings of K9 coming together here, despite all invidiual good intentions.

  1. swipe too quick to delete #7015 : swipe functionality is way too sensitive, cannot be configured etc.
    Result is that too many mails end up in Junk or Trash (my two swipe settings) unintentionally

  2. Lack of a swipe-undo function
    Issue number 1 could be mitigated through an easy undo but that functionality is lacking.
    Undo instead of confirmation for mail deletion #624 seems to be related.

  3. Delete spam immediately, without moving to trash folder first #6298 Deleting messages from Junk directly
    What happened to me: unintentional swipe into junk, trying to correct the mistake but doing another unintentional swipe again (to digital nirvana). There goes an important mail...

Blame on my lack of exact motor function (and/or being in a hurry), but the overall result of these three issues reduces my user experience of the otherwise great K9.

Several options in my view:

@Slater91
Copy link

I have found myself deleting emails permanently because no trash folder was configured for whatever reason. Adding an alert when configuring the account that no trash folder was configured would definitely help avoiding such instances, as I was not aware it wasn't configured and I wouldn't have thought that was something which could happen. As KomtGoed said as well, adding a "cancel" feature for all instances where you can delete a message (in the app as well as in the notifications) would further make sure that no accidental deletion can take place.

@mhf1998
Copy link
Contributor

mhf1998 commented Aug 6, 2024

I have found myself deleting emails permanently because no trash folder was configured for whatever reason. Adding an alert when configuring the account that no trash folder was configured would definitely help avoiding such instances, as I was not aware it wasn't configured and I wouldn't have thought that was something which could happen. As KomtGoed said as well, adding a "cancel" feature for all instances where you can delete a message (in the app as well as in the notifications) would further make sure that no accidental deletion can take place.

Hello @Slater91
Do you mean that this bug does not exist and can be closed?

@Slater91
Copy link

Slater91 commented Aug 6, 2024

No, I was saying that in my case it was a different, but related issue which would have benefited from countermeasures that would apply to this one as well.

@vdbhb59
Copy link

vdbhb59 commented Aug 6, 2024

This issue still persists, but it happens randomly, unfortunately. :(

Copy link

Thank you for taking the time to report this issue. It looks like we haven't heard back in a while, therefore we're closing this issue. If the problem persists in the latest version please open a new issue and reference this one so we can follow up more effectively.

@github-actions github-actions bot removed the status: needs information Needs more information to proceed label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is causing incorrect behavior or errors
Projects
None yet
Development

No branches or pull requests

7 participants