diff options
Diffstat (limited to 'sort.c')
-rw-r--r-- | sort.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -182,7 +182,7 @@ dsn_class_t sort_deliver_to_mailbox(struct DbmailMessage *message, } // Ok, we have the ACL right, time to deliver the message. - switch (db_copymsg(message->id, mboxidnr, useridnr, &newmsgidnr)) { + switch (db_copymsg(message->mailbox, message->id, mboxidnr, useridnr, &newmsgidnr)) { case -2: TRACE(TRACE_DEBUG, "error copying message to user [%" U64_T_FORMAT "]," "maxmail exceeded", useridnr); @@ -192,14 +192,15 @@ dsn_class_t sort_deliver_to_mailbox(struct DbmailMessage *message, useridnr); return DSN_CLASS_TEMP; default: - TRACE(TRACE_MESSAGE, "message id=%" U64_T_FORMAT ", size=%zd is inserted", - newmsgidnr, msgsize); + TRACE(TRACE_MESSAGE, "message id=%" U64_T_FORMAT ", size=%zd is inserted to mailbox id=%" U64_T_FORMAT "", + newmsgidnr, msgsize, mboxidnr); if (msgflags) { - TRACE(TRACE_MESSAGE, "message id=%" U64_T_FORMAT ", setting imap flags", - newmsgidnr); + TRACE(TRACE_MESSAGE, "mbox id=%" U64_T_FORMAT ", message id=%" U64_T_FORMAT ", setting imap flags", + mboxidnr, newmsgidnr); db_set_msgflag(newmsgidnr, mboxidnr, msgflags, IMAPFA_ADD); } message->id = newmsgidnr; + message->mailbox = mboxidnr; return DSN_CLASS_OK; } } |