Solution to bug no. 258 (forging of from headers with IMAP move)
[citadel.git] / citadel / modules / imap / imap_misc.c
index 671c6ce5fdc2f1c1847b3b2b78bbec4054cea25b..8525216b8d5b259c21ce2f7ba73085e05e2d389d 100644 (file)
@@ -454,7 +454,7 @@ void imap_append(int num_parms, char *parms[]) {
         * private mailboxes.
         */
        if (CC->logged_in) {
-          if ( (CC->room.QRflags & QR_MAILBOX) == 0) {
+          if ( ((CC->room.QRflags & QR_MAILBOX) == 0) && (config.c_imap_keep_from == 0)) {
                if (msg->cm_fields['A'] != NULL) free(msg->cm_fields['A']);
                if (msg->cm_fields['N'] != NULL) free(msg->cm_fields['N']);
                if (msg->cm_fields['H'] != NULL) free(msg->cm_fields['H']);