Skip to content

Offline imap attempts to delete messages on synchronization #730

@rom1v

Description

@rom1v

General informations

  • system/distribution (with version): Debian sid
  • offlineimap version (offlineimap -V): 8.0.0
  • Python version: 3.11.2
  • server name or domain: my own domain
  • CLI options: offlineimap -c offlineimaprc

Configuration file offlineimaprc

[general]
accounts = XXXXX

[Account XXXXX]
localrepository = Local
remoterepository = Remote

[Repository Local]
type = Maildir
localfolders = /my/backup/folder

[Repository Remote]
type = IMAP
remotehost = ...
remoteuser = ...
remotepassfile = ...
ssl = yes
cert_fingerprint = ...

Logs, error

Apparently, it attempts to delete messages on synchronization (I have this error for all special folders). I use it for backup purpose, it should not even try to write/delete messages.

 Deleting 8 messages (32921:32928) in IMAP[Sent]
 Attempted to modify flags for messages [32921, 32922, 32923, 32924, 32925, 32926, 32927, 32928] in folder IMAP[Sent], but that folder is read-only.  No flags have been modified for that message.
 ERROR: while syncing Sent [account XXXXX]
  mailbox status changed to READ-ONLY
 ERROR: ERROR in syncfolder for XXXXX folder Sent: Traceback (most recent call last):
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 666, in syncfolder
    localfolder.syncmessagesto(remotefolder, statusfolder)
  File "/usr/share/offlineimap3/offlineimap/folder/Base.py", line 1164, in syncmessagesto
    action(dstfolder, statusfolder)
  File "/usr/share/offlineimap3/offlineimap/folder/Base.py", line 1029, in __syncmessagesto_delete
    dstfolder.deletemessages(deletelist)
  File "/usr/share/offlineimap3/offlineimap/folder/IMAP.py", line 1074, in deletemessages
    self.__deletemessages_noconvert(uidlist)
  File "/usr/share/offlineimap3/offlineimap/folder/IMAP.py", line 1089, in __deletemessages_noconvert
    assert (imapobj.expunge()[0] == 'OK')
            ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 794, in expunge
    return self._simple_command(name, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 1684, in _simple_command
    return self._command_complete(self._command(name, *args), kw)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 1350, in _command
    raise self.readonly('mailbox status changed to READ-ONLY')
imaplib2.IMAP4.readonly: mailbox status changed to READ-ONLY

Steps to reproduce the error

I just run offlineimap -c offlineimaprc. It did not happen until recently (maybe there was an upgrade to 8.0.0)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions