2002-06-22 06:10:49 +02:00
|
|
|
productname = 'OfflineIMAP'
|
2007-10-19 21:32:21 +02:00
|
|
|
versionstr = "5.99.4"
|
2002-06-22 06:10:49 +02:00
|
|
|
|
|
|
|
versionlist = versionstr.split(".")
|
|
|
|
major = versionlist[0]
|
|
|
|
minor = versionlist[1]
|
|
|
|
patch = versionlist[2]
|
2007-07-04 20:17:14 +02:00
|
|
|
copyright = "Copyright (C) 2002 - 2007 John Goerzen"
|
2002-06-22 06:10:49 +02:00
|
|
|
author = "John Goerzen"
|
|
|
|
author_email = "jgoerzen@complete.org"
|
|
|
|
description = "Disconnected Universal IMAP Mail Synchronization/Reader Support"
|
2006-11-30 12:23:18 +01:00
|
|
|
bigcopyright = """%(productname)s %(versionstr)s
|
2002-07-18 01:06:27 +02:00
|
|
|
%(copyright)s <%(author_email)s>""" % locals()
|
2002-06-22 07:29:48 +02:00
|
|
|
|
2002-07-11 15:25:53 +02:00
|
|
|
banner = bigcopyright + """
|
2002-06-22 07:29:48 +02:00
|
|
|
This software comes with ABSOLUTELY NO WARRANTY; see the file
|
|
|
|
COPYING for details. This is free software, and you are welcome
|
2002-07-11 15:25:53 +02:00
|
|
|
to distribute it under the conditions laid out in COPYING."""
|
2002-06-22 07:29:48 +02:00
|
|
|
|
2006-11-30 10:46:51 +01:00
|
|
|
homepage = "http://software.complete.org/offlineimap/"
|
2007-07-04 20:17:14 +02:00
|
|
|
license = """Copyright (C) 2002 - 2007 John Goerzen <jgoerzen@complete.org>
|
2002-06-22 06:10:49 +02:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2003-04-16 21:23:45 +02:00
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
2002-06-22 06:10:49 +02:00
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2006-08-12 06:15:55 +02:00
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"""
|
2002-07-12 09:51:52 +02:00
|
|
|
|
2007-07-10 13:57:03 +02:00
|
|
|
def getcmdhelp():
|
|
|
|
from offlineimap.ui import detector
|
|
|
|
import os
|
|
|
|
uilist = ""
|
|
|
|
for ui in detector.DEFAULT_UI_LIST:
|
|
|
|
uilist += " " + ui + os.linesep
|
|
|
|
return """
|
2002-07-23 03:48:15 +02:00
|
|
|
offlineimap [ -1 ] [ -P profiledir ] [ -a accountlist ] [
|
2002-08-08 22:21:56 +02:00
|
|
|
-c configfile ] [ -d debugtype[,debugtype...] ] [ -o ] [
|
Daniel Jacobowitz patches
fixes deb#433732
Date: Sun, 30 Sep 2007 13:54:56 -0400
From: Daniel Jacobowitz <drow@false.org>
To: offlineimap@complete.org
Subject: Assorted patches
Here's the result of a lazy Sunday hacking on offlineimap. Sorry for
not breaking this into multiple patches. They're mostly logically
independent so just ask if that would make a difference.
First, a new -q (quick) option. The quick option means to only update
folders that seem to have had significant changes. For Maildir, any
change to any message UID or flags is significant, because checking
the flags doesn't add a significant cost. For IMAP, only a change to
the total number of messages or a change in the UID of the most recent
message is significant. This should catch everything except for
flags changes.
The difference in bandwidth is astonishing: a quick sync takes 80K
instead of 5.3MB, and 28 seconds instead of 90.
There's a configuration variable that lets you say every tenth sync
should update flags, but let all the intervening ones be lighter.
Second, a fix to the UID validity problems many people have been
reporting with Courier. As discussed in Debian bug #433732, I changed
the UID validity check to use SELECT unless the server complains that
the folder is read-only. This avoids the Courier bug (see the Debian
log for more details). This won't fix existing validity errors, you
need to remove the local status and validity files by hand and resync.
Third, some speedups in Maildir checking. It's still pretty slow
due to a combination of poor performance in os.listdir (never reads
more than 4K of directory entries at a time) and some semaphore that
leads to lots of futex wake operations, but at least this saves
20% or so of the CPU time running offlineimap on a single folder:
Time with quick refresh and md5 in loop: 4.75s user 0.46s system 12%
cpu 41.751 total
Time with quick refresh and md5 out of loop: 4.38s user 0.50s system
14% cpu 34.799 total
Time using string compare to check folder: 4.11s user 0.47s system 13%
cpu 34.788 total
And fourth, some display fixes for Curses.Blinkenlights. I made
warnings more visible, made the new quick sync message cyan, and
made all not explicitly colored messages grey. That last one was
really bugging me. Any time OfflineIMAP printed a warning in
this UI, it had even odds of coming out black on black!
Anyway, I hope these are useful. I'm happy to revise them if you see
a problem.
--
Daniel Jacobowitz
CodeSourcery
2007-10-01 23:20:37 +02:00
|
|
|
-u interface ] [ -q ]
|
2002-07-12 09:51:52 +02:00
|
|
|
|
|
|
|
offlineimap -h | --help
|
|
|
|
|
2002-08-08 22:21:56 +02:00
|
|
|
-1 Disable all multithreading operations and use
|
2002-07-12 09:51:52 +02:00
|
|
|
solely a single-thread sync. This effectively sets
|
|
|
|
the maxsyncaccounts and all maxconnections configu-
|
|
|
|
ration file variables to 1.
|
|
|
|
|
2002-07-23 03:48:15 +02:00
|
|
|
-P profiledir
|
2002-08-08 22:21:56 +02:00
|
|
|
Sets OfflineIMAP into profile mode. The program
|
2002-07-23 03:48:15 +02:00
|
|
|
will create profiledir (it must not already exist).
|
|
|
|
As it runs, Python profiling information about each
|
2002-08-08 22:21:56 +02:00
|
|
|
thread is logged into profiledir. Please note:
|
|
|
|
This option is present for debugging and optimiza-
|
2002-07-23 03:48:15 +02:00
|
|
|
tion only, and should NOT be used unless you have a
|
2002-08-08 22:21:56 +02:00
|
|
|
specific reason to do so. It will significantly
|
|
|
|
slow program performance, may reduce reliability,
|
|
|
|
and can generate huge amounts of data. You must
|
2002-07-23 03:48:15 +02:00
|
|
|
use the -1 option when you use -P.
|
|
|
|
|
|
|
|
|
2002-07-12 09:51:52 +02:00
|
|
|
-a accountlist
|
2002-08-08 22:21:56 +02:00
|
|
|
Overrides the accounts section in the config file.
|
|
|
|
Lets you specify a particular account or set of
|
|
|
|
accounts to sync without having to edit the config
|
2002-07-12 09:51:52 +02:00
|
|
|
file. You might use this to exclude certain
|
2002-08-08 22:21:56 +02:00
|
|
|
accounts, or to sync some accounts that you nor-
|
2002-07-12 09:51:52 +02:00
|
|
|
mally prefer not to.
|
|
|
|
|
|
|
|
-c configfile
|
2002-08-08 22:21:56 +02:00
|
|
|
Specifies a configuration file to use in lieu of
|
2002-07-12 09:51:52 +02:00
|
|
|
the default, ~/.offlineimaprc.
|
|
|
|
|
2002-08-08 22:21:56 +02:00
|
|
|
-d debugtype[,debugtype...]
|
|
|
|
Enables debugging for OfflineIMAP. This is useful
|
|
|
|
if you are trying to track down a malfunction or
|
|
|
|
figure out what is going on under the hood. I sug-
|
|
|
|
gest that you use this with -1 in order to make the
|
|
|
|
results more sensible.
|
|
|
|
|
|
|
|
-d now requires one or more debugtypes, separated
|
|
|
|
by commas. These define what exactly will be
|
|
|
|
debugged, and so far include two options: imap and
|
|
|
|
maildir. The imap option will enable IMAP protocol
|
|
|
|
stream and parsing debugging. Note that the output
|
|
|
|
may contain passwords, so take care to remove that
|
|
|
|
from the debugging output before sending it to any-
|
|
|
|
one else. The maildir option will enable debugging
|
|
|
|
for certain Maildir operations.
|
|
|
|
|
2008-01-03 04:13:04 +01:00
|
|
|
-k [section:]option=value
|
|
|
|
Override configuration file option. If"section" is
|
|
|
|
omitted, it defaults to "general". Any underscores
|
|
|
|
"_" in the section name are replaced with spaces:
|
|
|
|
for instance, to override option "autorefresh" in
|
|
|
|
the "[Account Personal]" section in the config file
|
|
|
|
one would use "-k Account_Personal:autorefresh=30".
|
|
|
|
|
|
|
|
-o Run only once, ignoring any autorefresh setting in
|
2002-07-23 03:48:15 +02:00
|
|
|
the config file.
|
|
|
|
|
Daniel Jacobowitz patches
fixes deb#433732
Date: Sun, 30 Sep 2007 13:54:56 -0400
From: Daniel Jacobowitz <drow@false.org>
To: offlineimap@complete.org
Subject: Assorted patches
Here's the result of a lazy Sunday hacking on offlineimap. Sorry for
not breaking this into multiple patches. They're mostly logically
independent so just ask if that would make a difference.
First, a new -q (quick) option. The quick option means to only update
folders that seem to have had significant changes. For Maildir, any
change to any message UID or flags is significant, because checking
the flags doesn't add a significant cost. For IMAP, only a change to
the total number of messages or a change in the UID of the most recent
message is significant. This should catch everything except for
flags changes.
The difference in bandwidth is astonishing: a quick sync takes 80K
instead of 5.3MB, and 28 seconds instead of 90.
There's a configuration variable that lets you say every tenth sync
should update flags, but let all the intervening ones be lighter.
Second, a fix to the UID validity problems many people have been
reporting with Courier. As discussed in Debian bug #433732, I changed
the UID validity check to use SELECT unless the server complains that
the folder is read-only. This avoids the Courier bug (see the Debian
log for more details). This won't fix existing validity errors, you
need to remove the local status and validity files by hand and resync.
Third, some speedups in Maildir checking. It's still pretty slow
due to a combination of poor performance in os.listdir (never reads
more than 4K of directory entries at a time) and some semaphore that
leads to lots of futex wake operations, but at least this saves
20% or so of the CPU time running offlineimap on a single folder:
Time with quick refresh and md5 in loop: 4.75s user 0.46s system 12%
cpu 41.751 total
Time with quick refresh and md5 out of loop: 4.38s user 0.50s system
14% cpu 34.799 total
Time using string compare to check folder: 4.11s user 0.47s system 13%
cpu 34.788 total
And fourth, some display fixes for Curses.Blinkenlights. I made
warnings more visible, made the new quick sync message cyan, and
made all not explicitly colored messages grey. That last one was
really bugging me. Any time OfflineIMAP printed a warning in
this UI, it had even odds of coming out black on black!
Anyway, I hope these are useful. I'm happy to revise them if you see
a problem.
--
Daniel Jacobowitz
CodeSourcery
2007-10-01 23:20:37 +02:00
|
|
|
-q Run only quick synchronizations. Ignore any flag
|
|
|
|
updates on IMAP servers.
|
|
|
|
|
2002-07-12 09:51:52 +02:00
|
|
|
-h, --help
|
|
|
|
Show summary of options.
|
|
|
|
|
|
|
|
-u interface
|
2002-08-08 22:21:56 +02:00
|
|
|
Specifies an alternative user interface module to
|
|
|
|
use. This overrides the default specified in the
|
|
|
|
configuration file. The UI specified with -u will
|
|
|
|
be forced to be used, even if its isuable() method
|
|
|
|
states that it cannot be. Use this option with
|
2007-01-11 10:15:06 +01:00
|
|
|
care. The pre-defined options, described in the
|
|
|
|
USER INTERFACES section of the man page, are:
|
2007-07-10 13:57:03 +02:00
|
|
|
""" + uilist
|