[GH-ISSUE #281] IMPORT_MAIL_DELETE not working #228

Open
opened 2026-02-25 21:31:29 +03:00 by kerem · 5 comments
Owner

Originally created by @TapuGithub on GitHub (Jan 9, 2021).
Original GitHub issue: https://github.com/ciur/papermerge/issues/281

Originally assigned to: @ciur on GitHub.

Description
IMPORT_MAIL_DELETE = True, Gmail, emails collected well.

Expected
Processed emails deleted.

Actual
Processed emails not deleted.

Info:

  • OS: Ubuntu 20.04 LTS in LXC Proxmox 6.2
  • Browser Not relevant
  • Database SQLite
  • Papermerge Version 1.5.5
Originally created by @TapuGithub on GitHub (Jan 9, 2021). Original GitHub issue: https://github.com/ciur/papermerge/issues/281 Originally assigned to: @ciur on GitHub. **Description** IMPORT_MAIL_DELETE = True, Gmail, emails collected well. **Expected** Processed emails deleted. **Actual** Processed emails not deleted. **Info:** - OS: Ubuntu 20.04 LTS in LXC Proxmox 6.2 - Browser Not relevant - Database SQLite - Papermerge Version 1.5.5
Author
Owner

@ciur commented on GitHub (Jan 10, 2021):

@TapuGithub, thanks for opening this issue.
The problem is that IMPORT_MAIL_DELETE is part version 2.0 (which is still in development). By mistake it was added to documentation. I will update documentation with this note (that is IMPORT_MAIL_DELETE available only for version 2.0).

<!-- gh-comment-id:757420519 --> @ciur commented on GitHub (Jan 10, 2021): @TapuGithub, thanks for opening this issue. The problem is that ``IMPORT_MAIL_DELETE`` is part version 2.0 (which is still in development). By mistake it was added to documentation. I will update documentation with this note (that is ``IMPORT_MAIL_DELETE`` available only for version 2.0).
Author
Owner

@TapuGithub commented on GitHub (Jan 11, 2021):

Thanks for the fast repose. I will be waiting for 2.0 to use it.

<!-- gh-comment-id:757890227 --> @TapuGithub commented on GitHub (Jan 11, 2021): Thanks for the fast repose. I will be waiting for 2.0 to use it.
Author
Owner

@l4rm4nd commented on GitHub (Mar 9, 2021):

My pull request for papermerge-core might fix this issue. For this pull request, mails are not permanently deleted, but marked as read/seen and moved to the trash folder.

This simulates an email deletion and should work more reliably across various mail providers.

<!-- gh-comment-id:794009971 --> @l4rm4nd commented on GitHub (Mar 9, 2021): My [pull request](https://github.com/papermerge/papermerge-core/pull/6) for papermerge-core might fix this issue. For this pull request, mails are not permanently deleted, but marked as read/seen and moved to the trash folder. This simulates an email deletion and should work more reliably across various mail providers.
Author
Owner

@l4rm4nd commented on GitHub (Mar 9, 2021):

My pull request for papermerge-core might fix this issue. For this pull request, mails are not permanently deleted, but marked as read/seen and moved to the trash folder.

This simulates an email deletion and should work more reliably across various mail providers.

Mail deletion using python's IMAPClient needs to use delete_messages() and a final call to expunge() to take effect, which is currently missing in papermerge-core's imap.py.

Fix in pull request: https://github.com/papermerge/papermerge-core/pull/6#issuecomment-794096923

<!-- gh-comment-id:794102720 --> @l4rm4nd commented on GitHub (Mar 9, 2021): > My [pull request](https://github.com/papermerge/papermerge-core/pull/6) for papermerge-core might fix this issue. For this pull request, mails are not permanently deleted, but marked as read/seen and moved to the trash folder. > > This simulates an email deletion and should work more reliably across various mail providers. Mail deletion using python's IMAPClient needs to use ``delete_messages()`` and a final call to ``expunge()`` to take effect, which is currently missing in papermerge-core's `imap.py`. Fix in pull request: https://github.com/papermerge/papermerge-core/pull/6#issuecomment-794096923
Author
Owner

@ciur commented on GitHub (Mar 12, 2021):

I think release 2.0.0.rc48 should fix this issue.

<!-- gh-comment-id:797371605 --> @ciur commented on GitHub (Mar 12, 2021): I think [release 2.0.0.rc48](https://github.com/ciur/papermerge/releases/tag/v2.0.0rc48) should fix this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#228
No description provided.