Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Mar 25, 2011
  1. @spaetz @nicolas33

    Increase compatability with Gmail

    spaetz authored nicolas33 committed
    When uploading a new message to Gmail we need to find out the UID it
    assigned it, but Gmail does not advertize the UIDPLUS extension (in all
    cases) and it fails to find the email that we just uploaded when
    searching for it. This prevented us effectively from uploading to
    gmail.
    
    See analysis in
    http://lists.alioth.debian.org/pipermail/offlineimap-project/2011-March/001449.html
    for details on what is going wrong.
    
    This patch increases compatability with Gmail by checking for APPENDUID
    responses to an APPEND action even if the server did not claim to
    support it. This restores the capability to upload messages to the
    *broken* Gmail IMAP implementation.
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Commits on Mar 10, 2011
  1. @spaetz @nicolas33

    Declutter TTY output

    spaetz authored nicolas33 committed
    Previously we would output:
    
    Folder sync sspaeth.de[INBOX.INBOX201004]:
     Syncing INBOX.INBOX201004: IMAP -> Maildir
    Folder sync sspaeth.de[INBOX.INBOX201006]:
     Syncing INBOX.INBOX201006: IMAP -> Maildir
    Folder sync sspaeth.de[INBOX.INBOX201009]:
     Syncing INBOX.INBOX201009: IMAP -> Maildir
    
    which is very repetitive and cluttered. By naming the folder sync
    threads just according to the account and not the folder, the output
    looks much nicer:
    
    Folder sync [sspaeth.de]:
     Syncing INBOX.INBOX201004: IMAP -> Maildir
     Syncing INBOX.INBOX201006: IMAP -> Maildir
     Syncing INBOX.INBOX201009: IMAP -> Maildir
    
    If syncing multiple accounts in parallel, we will still get headers
    indicating the account:
    
    Folder sync [sspaeth.de]:
     Syncing INBOX: IMAP -> Maildir
     Syncing INBOX.INBOX201006: IMAP -> Maildir
    Folder sync [gmail]:
     Syncing INBOX: IMAP -> Maildir
    
    This is a small fix that makes the output much nicer in my opinion.
    
    Also don't output the thread name if we are in the MainThread, e.g. when
    we output the initial offlineimap banner.
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Commits on Mar 7, 2011
  1. @spaetz @nicolas33

    Simplify the syncing strategy a bit

    spaetz authored nicolas33 committed
    The previous syncing strategy was doing more than we needed to and was a
    bit underdocumented. This is an attempt to clean it up.
    
    1) Do away with the previous different code paths depending on
    whether there is a LocalStatus file or not (the isnewfolder() test). We
    always use the same strategy now, which makes the strategy easier to
    understand. This strategy is simply:
    
    a) Sync remote to local folder first
    b) Sync local to remote
    
    Where each sync implies a 4 pass strategy which does basically the same
    as before (explained below).
    
    2) Don't delete messages on LOCAL which don't exist on REMOTE right at
    the beginning anymore. This prevented us e.g. from keeping local
    messages rather than redownloading everything once LocalStatus got
    corrupted or deleted. This surprised many who put in an existing local
    maildir and expected it to be synced to the remote place. Instead, the
    local maildir was deleted. This is a data loss that actually occured to
    people!
    
    3) No need to separately sync the statusfolder, we update that one
    simultanously with the destfolders...
    
    3) Simplified the sync function API by only taking one destdir rather
    than a list of destdirs, we never used more anyway. This makes the code
    easier to read.
    
    4) Added plenty of code comments while I was going through to make sure
    the strategy is easy to understand.
    -----------------------------------------
    
     Pass1: Transfer new local messages
            Upload msg with negative/no UIDs to dstfolder. dstfolder should
            assign that message a new UID. Update statusfolder.
    
     Pass2: Copy existing messages
            Copy messages in self, but not statusfolder to dstfolder if not
            already in dstfolder. Update statusfolder.
    
     Pass3: Remove deleted messages
            Get all UIDS in statusfolder but not self. These are messages
            that we have locally deleted. Delete those from dstfolder and
            statusfolder.
    
     Pass4: Synchronize flag changes
            Compare flags in self with those in statusfolder. If msg has a
            valid UID and exists on dstfolder (has not e.g.  been deleted
            there), sync the flag change to dstfolder and statusfolder.
    
    The user visible implications of this change should be unnoticable
    except in one situation:
     Blowing away LocalStatus will not require you to redownload ALL of
     your mails if you still have the local Maildir. It will simply recreate
     LocalStatus.
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Commits on Mar 6, 2011
  1. @spaetz @nicolas33

    Allow to use nicer UI names

    spaetz authored nicolas33 committed
    The previous ui names were pretty unwieldy. Is it TTYUI.TTY or
    TTY.TTYUI? Do I have to use capitals and where?
    
    Simplify the names by making them case insensitive and by dropping
    everything before the dot.
    
    So "Curses.Blinkenlights" can now be invoked as "blinkenlights" or
    "BLINKENLIGHTS". The old names will still work just fine so the
    transition should be smooth. We issue a warning that the long names are
    deprecated.
    
    Document in offlineimap.conf that we don't accept lists of fallback UIs,
    but only one UI option (this was already the case before this commit but
    still wrongly documented).
    
    The list of accepted ui names is:
      ttyui (default), basic, quiet, machineui, blinkenlights
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Commits on Mar 5, 2011
  1. @spaetz @nicolas33

    Implement APPENDUID support

    spaetz authored nicolas33 committed
    Rather than inserting our own home-grown header, everytime we save a
    message to an IMAP server, we check if we suport the UIDPLUS extension
    which provides us with an APPENDUID reply. Use that to find the new UID
    if possible, but keep the old way if we don't have that extension.
    
    If a folder is read-only, return the uid that we have passed in per API
    description in folder.Base.py
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
  2. @spaetz @nicolas33

    Factor out the date guessing/retrieving

    spaetz authored nicolas33 committed
    savemessage was too long and complex. Factor out the date guessing part
    of the function and put it into a function of its own. The logic of the
    date guessing is the same, however, we do not use the
    imaplib.Time2InternalDate() function as it is buggy
    (http://bugs.python.org/issue11024) and returns localized patches. So we
    create INTERNALDATE ourselves and pass it to append() as a string.
    
    This commit fixes a bug that international users used to pass an invalid
    date to the IMAP server, which the server will either ignore or complain
    about.
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Commits on Mar 3, 2011
  1. @spaetz @nicolas33

    Make profiling mode really enforce singlethreading

    spaetz authored nicolas33 committed
    A typo was preventing profiling mode to really enable singlethreading
    mode. Fixing the unfortunate typo of mine makes it work.
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
  2. @spaetz @nicolas33

    Create an abstract Repository class

    spaetz authored nicolas33 committed
    A Repository() returns the correctly instanciated dervivate of a
    BaseRepository, depending on the parameters passed to it. The returned
    instance is eg an ImapRepository(). This makes the code look nicer,
    and we have less functions lying around outside of classes (no more
    global LoadRepository() function).
    
    This will also enable us to conveniently hand back a
    LocalStatusRepository based on SQLITE rather than plain text, if the
    user configures this to be the experimental and optional backend
    (once it exists).
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Commits on Mar 1, 2011
  1. @spaetz @nicolas33

    repository/Base.py: Fix regression (UIBase is no more)

    spaetz authored nicolas33 committed
    Commit e506442 changed getglobalui() back to UIBase.getglobalui()
    although the import had changed earlier, causing a regression.
    
    Fix this by using the correct and current way of calling the ui.
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Commits on Feb 17, 2011
  1. @spaetz @nicolas33

    Use self.ui rather than UIBase.getglobalui()

    spaetz authored nicolas33 committed
    We have vonverted all places in folder/* to have self.ui available,
    rather than having to use UIBase.getglobalui() all the
    time. Unfortunately, we did not convert the users in folder/Base.py.
    This patch does it belatedly. This fixes
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613483
    
    Signed-off-by: Sebastian Spaeth1 <Sebastian@SSpaeth.de>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Commits on Jan 27, 2011
  1. @spaetz @nicolas33

    have --version ONLY print the version number

    spaetz authored nicolas33 committed
    Make --version much less verbose and only print out the version number
    to facilitate easy parsing by scripts. We don't really need the verbose
    copyright output, it is show with --help anyway.
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
    Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Commits on Jan 20, 2011
  1. @spaetz @nicolas33

    Improve CustomConfig documentation

    spaetz authored nicolas33 committed
    Improve documentation about what CustomConfigHelperMixin does,
    it was not very clear without a close look to the code before.
    
    Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Something went wrong with that request. Please try again.