<DKIM> Yet another UID validity problem

Nikos Alexandris nik at nikosalexandris.net
Thu Apr 2 19:10:47 BST 2015

Nikos Alexandris wrote:

>> Hi list.
>> I have been using mutt since for almost a year now, and I am really
>> happy with it.  I have had though some mishap, probably due to my
>> misunderstanding of how things work. I have described the problem I 
>> had
>> at <http://superuser.com:8080/q/822112/128768>.

> -------- Paste
>> I have had a UID related problem and followed instructions found at
>> OfflineIMAP's FAQ: 1.1.5 What is the UID validity problem for 
>> folder?. I erased
>> the local folder in question (INBOX).

Nicolas Sebrecht wrote:

> When I read "delete" or "erase", I naturally translate this to 
> "archive" or
> "move". This way of writing documentation online just allows more
> straightforward instructions.

> Since it might not be obvious, I'll update the FAQ in this direction.

I think this is a good idea.

>> I guess I did something very wrong (e.g. forgot to erase the cache
>> file(s)) and I've lost many e-mails

> Not sure what happened.

When I remove the local folders, as per the FAQ's recommendation, then, 
the syncing from Local to Remote just removed anything that was removed 

I am trying to avoid this, until I mange to bring my  .maildir  in the 
shape I want, by using the
`readonly = true` instruction for the Remote repository. I am not sure 
if I have done this correctly though (please, see copy-paste content of 
my  .offlineimaprc  file which reflects my current setup).

> A deleted folder in the Maildir should get "ignored", actually. This 
> is to
> prevent from wrong manipulations when working locally.

This is a nice feature then :-)

> This is not the same
> thing that removeing the _content_ of the directory which then will 
> reflect the
> changes, IOW remove all known messages on the remote.

I don't understand this:  if I remove a folder, using the very 
dangerous `rm -rf`, all of its content is lost as well. Right?  (Tip, I 
have stopped using `rm -rf` and use, as much as I can, `mv stuff /tmp`).

>>                                                               -- 
>> that is, they
>> never got re-downloaded from the remote mailbox in to the local one. 
>> (Updated)
>> And, they were not present in the remote repository as well! The 
>> attempt to
>> sync, after erasing the local folder, ended up in erasing the 
>> material from the
>> remote location as well.
>> (Updated) In ~/.offlineimaprc, the option createfolders = False and 
>> a commented
>> line #readonly=true, were set to the section the corresponds to the 
>> remote
>> repository.
> I'm not aware of issues with readonly not doing what it pretends.
>> Fortunately, I keep a second local maildir in another computer, 
>> which I synced
>> (very) recently. This may be used as a backup to restore the lost 
>> material up
>> to the remote repository.
> Good.

Yes -- though I think I did loose some stuff after checking again today 
:-(.  Nevermind, there tons of e-mails still there to enjoy :-)

>> How can I force a one-way syncing from the "backup" local-repository 
>> to the
>> remote repository? Are the options createfolders and readonly useful 
>> in this
>> case?

> Make yet another archive to prevent any data loss. The way to proceed 
> is the
> one I described in the post you're pointing below.

I will.  Before going-on, I did some quick-test of my own.  I just 
backed up the current .maildir, removed the `INBOX` along with the 
`LocalStatus` and the `FolderValidity`, and synced with my current 
setup. All looked fine, until I tried to open some archived mbox-es I 
have, using mutt, and trying to save read messages in one the existing 
folders. Most folders appear as empty, though I can see that there are 
stuff inside.

> I'll write more documentation about that, too.
> -------- /Paste
> <...>
>> I have found and read a very relevant post:
>> <http://thread.gmane.org/gmane.mail.imap.offlineimap.general/6634>.
>> However, I'd like to confirm my understanding of how things (will) 
>> work.

> To confirm your understanding, write us what you've understood!

First, I'd like to review my settings (offlineimaprc file pasted 
below).  Then I'll do describe what and how I think about how things 

>> Of course, the manual contains all of the bits (?), but still, 
>> wouldn't
>> make sense to have some generic approach in the FAQ on what to do 
>> when a
>> user reads "UID validity problem for folder INBOX"? Something very
>> clean, step-by-step, like in Nicolas Sebrech's post?

> Yes, I'll do that.

Thank you very much (for your time and not only), Nikos

--%<--- .offlineimaprc --%<---


accounts = @domain.net  # Comma separated list accounts to be synced    
          Battery 100%
pythonfile = ~/.offlineimap/offlineimap.py  #pythonfile = 
     # ? does not work, yet!
maxsyncaccounts = 1  # Controls how many accounts may be synced 

[Account @domain.net] # ---------------------------------------------

#autorefresh = 5  # Minutes between syncs
#quick = 10  # Number of quick-syncs between autorefreshes.
     # Quick-syncs do not update if the only changes were to IMAP flags

# Identifier for the local repository; e.g. the maildir to be synced 
via IMAP.
localrepository = @domain.net-local

# Identifier for the remote repository; i.e. the actual IMAP, usually 
remoterepository = @domain.net

# Status cache. Default is plain, which eventually becomes huge and 
status_backend = sqlite

[Repository @domain.net-local] # Local ------------------------------

type = Maildir # Currently, support for maildir/IMAP for local 
localfolders = ~/.maildir  # Where should the mail be placed?
sep = /

[Repository @domain.net] # Remote -----------------------------------

keepalive = 60
holdconnectionopen = yes
type = IMAP
remotehost = mail.domain.net # remotehost = 
ssl = yes  # Use SSL? # sslcacertfile = 
cert_fingerprint = ????????????????????????????????????????  # Not that 
remoteport = 993  # Port
remoteuser = userid at domain.net  # User-name
remotepasseval = get_authinfo_password()  # Password
readonly = true  #createfolders = False
nametrans = lambda foldername: 
foldername.decode('imap4-utf-7').encode('utf-8')  # Name translation 
from UTF7 to UTF8

[mbnames] # 

enabled = yes
filename = ~/.mutt/mailboxes
header = "mailboxes "
peritem = "+/%(foldername)s"
sep = " "
footer = "\n"

More information about the OfflineIMAP-project mailing list