ANNOUNCEMENT: --dry-run in 'next' branch

Sebastian Spaeth Sebastian at SSpaeth.de
Fri Feb 17 12:36:44 UTC 2012


This has long been requested, and I have been annoyed by the lack of it
too. No longer...

I just pushed a few commits to the 'next' branch that implement a
"--dry-run" option to OfflineImap. If you use it, it will (hopefully
:-)) not make any changes to any repository, and it will simply output
what it would change (the relevant output log lines are prefixed with
[DRYRUN]).

There is one caveat: Some operations might depend on previous operations
actually being performed, so the list of actions might differ from what
is performed. Two examples:
- A new folder is being created. We output 
  "[DRYRUN] Create folder 'moo' on repo RemoteIMAP"
  However, we will not output how many and which emails will be synced
  (for this, we only take the actual existing folders into account)

- A mail is deleted on the remote and a flag changed on local. We will
  output both:
  [DRYRUN] Delete 1 message on folder moo[RemoteIMAP]
  [DRYRUN] Add flag 'S' to 1 message on folder moo[LocalMaildir]

I hope we can live with this limitation for now. At least it gives you a
safe way to determine which folders would be synced, and what would be
happening. The command line option docs have been updated:
http://docs.offlineimap.org/en/next/offlineimap.html. I will need to
create a "How to debug offlineimap" section to the user manual
describing --info and --dry-run better.

Let me know if this works or breaks for you.
Sebastian



More information about the OfflineIMAP-project mailing list