Offlineimap has a 'sync_deletes' flag that defaults to 'yes' in both your local and remote repositories. You can elect to delete locally and keep remote, or delete remotely and keep locally. See the short comment in the offlineimap configuration file on github: https://github.com/OfflineIMAP/offlineimap/blob/06ed00a2112f27dc7fc81a2444eb7f5afde062e1/offlineimap.conf One point that is not clear is how to flag a message locally to be deleted on the remote, without deleting the message locally. What you probably want to do is delete your messages using the GMail UI using a browser. Remember to make a backup! C On Fri, 5 Jul 2019 at 15:22, Sam Halliday wrote: > Hello all, > > I'm using emacs + notmuch + offlineimap + msmtp to manage my Gmail. > > My gmail account is starting to get so big that an offline sync is time > consuming. > > I'd like to delete messages on the server, but keep them locally. Is > that possible with IMAP? > > There is one complicating factor that stops me from being able to use > fetch-only POP3: I'd like to keep files on the server if they have the > +flagged tag, which is equivalent to "starred" in the Gmail interface. > > Has anybody got a setup similar to this? > > > -- > Best regards, > Sam > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch >