[Bug 238875] New: offlineimap: interop with dovecot SPAM folders.

David Laban alsuren at gmail.com
Wed May 26 12:43:34 CEST 2010


https://bugs.kde.org/show_bug.cgi?id=238875

           Summary: offlineimap: interop with dovecot SPAM folders.
           Product: kmail
           Version: 1.13.3
          Platform: Debian unstable
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdepim-bugs at kde.org
        ReportedBy: alsuren at gmail.com


Version:           1.13.3 (using KDE 4.4.3) 
OS:                Linux

Trying to copy things to the spam folder doesn't work with my company's server.
The destination folder was: work/Spam.
The server reported:
[CANNOT] Cannot APPEND to a SPAM folder.

A quick google for the error message returns
http://www.freenux.org/cgi-bin/gitweb.cgi?p=dovecot-antispam.git;a=commitdiff;h=513d1c5fa703817ae8fd08fab86709a9b5c111e4
+                       /*
+                        * The client is APPENDing a message to a SPAM folder
+                        * so we try to train the backend on it. For most of
+                        * the backends, that can only succeed if the message
+                        * contains appropriate information.
+                        *
+                        * This happens especially when offlineimap is used and
+                        * the user moved a message to the SPAM folder while
+                        * offline---offlineimap cannot reproduce the COPY but
+                        * rather APPENDs the moved message on the next sync.
+                        *
+                        * This could be a bad if the spam headers were not
+                        * generated on our server, but since the user can
+                        * always APPEND to another folder and then COPY to a
+                        * SPAM folder backends need to be prepared for cases
+                        * like this anyway. With dspam, for example, the worst
+                        * that can happen is that the APPEND fails with a
+                        * training error from dspam.
+                        *
+                        * Unfortunately, we cannot handle the cases where
+                        *  (1) the user moved a message from one folder that
+                        *      contains SPAM to another folder containing SPAM
+                        *  (2) the user moved a message out of the SPAM folder
+                        *  (3) the user recovered a message from trash
+                        *
+                        * Because of these limitations, this behaviour needs
+                        * to be enabled with an option.
+                        */
+                       if (!antispam_can_append_to_spam) {
+                               ret = -1;
+                               mail_storage_set_error(
+                                       save_dest_mail->box->storage,
+                                       "Cannot APPEND to a SPAM folder.");
+                               break;
+                       }

Reproducible: Always

Steps to Reproduce:
Set up offline imap account on company server which uses dovecot+dspam.
Drag mail from inbox to spam folder.
Hit F5 in the spam folder to make it sync.

Actual Results:  
Error while uploading message
Could not upload the message dated Yesterday 10:01:34 from "HK DISNEY LOTTERY"
<hkdesneylottery at 126.com> with subject "HONG KONG DISNEY LOTTERY 2010" to the
server.
The destination folder was: work/Spam.
The server reported:
[CANNOT] Cannot APPEND to a SPAM folder.

Expected Results:  
kmail should try to use COPY rather than APPEND for moving messages around, if
possible (would this also be more efficient?).

work-around: create an additional standard IMAP account in kmail, and only use
Disconnected IMAP for when you're on the train etc. Would be nice to only need
one imap account though.

OS: Linux (x86_64) release 2.6.32-trunk-amd64
Compiler: cc

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list