Package: imapcopy
Version: 1.04-1
Severity: normal
Tags: patch

When using the DstRootFolder option, it is ignored for the messages in the 
INBOX folder itself. All subfolders under INBOX are handled correctly.

EXAMPLE:

  SRC-Mailbox:
      INBOX
         /sent
         /drafts

  DST-Mailbox:
      INBOX

When using the config below, i would expect the following operation performed 
by imapcopy:
  
  INBOX Messages(SRC)        -> INBOX/FROMIST20111/(DST)
  INBOX/sent Messages(SRC)   -> INBOX/FROMIST20111/sent/(DST)
  INBOX/drafts Messages(SRC) -> INBOX/FROMIST20111/drafts/(DST)

Currently the following operation is performed:

  INBOX Messages(SRC)        -> INBOX/(DST)                       FAIL!!!
  INBOX/sent Messages(SRC)   -> INBOX/FROMIST20111/sent/(DST)     OK
  INBOX/drafts Messages(SRC) -> INBOX/FROMIST20111/drafts/(DST)   OK


The patch attached, should fix the problem, performing the first mode of 
operation.





The following imapcopy.cfg is used:

----

SourceServer localhost
SourcePort 1143
DestServer localhost
DestPort 143
DstRootFolder FROMIST20111
#CreateEmptyFolders
DenyFlags "\Recent"

Copy    "weberp"       "pass1"         "pweber"          "pass2"

----

call: imapcopy -s


Patch to fix problem, is attached.

I think this is an upstream bug.


-- System Information:
Debian Release: 5.0.8
  APT prefers oldstable
  APT policy: (800, 'oldstable'), (400, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages imapcopy depends on:
ii  libc6                       2.7-18lenny7 GNU C Library: Shared libraries

imapcopy recommends no packages.

imapcopy suggests no packages.

-- no debconf information
*** imapcopy-1.04-1/imapcopymain.pas	2011-04-20 18:28:22.000000000 +0200
--- imapcopy-1.04-2/imapcopymain.pas	2011-04-20 18:33:52.000000000 +0200
***************
*** 424,429 ****
--- 424,430 ----
            DstFolder := Dst.NamespaceUser;
            IF DstFolder = '' THEN
              DstFolder := 'INBOX';
+           DstFolder := DstFolder + '.' + DstRootFolder;
          END;
        END ELSE
        BEGIN  // copy all messages to INBOX

Reply via email to