Skip to content

Commit 4941ba5

Browse files
committed
midb: pass RFC5322 representation IMAP APPENDed mails to exmdb
When a client issues IMAP APPEND (midb gets the M-INST command), midb did not pass the RFC5322 representation to exmdb and so that was lost after midb.sqlite3 was recreated. References: GXH-155, GXF-2229
1 parent 52d7be0 commit 4941ba5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exch/midb/mail_engine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ static int me_minst(int argc, char **argv, int sockd) try
21422142
Json::Value digest;
21432143
if (imail.make_digest(digest) <= 0)
21442144
return MIDB_E_IMAIL_DIGEST;
2145-
digest["file"] = "";
2145+
digest["file"] = argv[3];
21462146
auto djson = json_to_str(digest);
21472147
if (!exmdb_client->imapfile_write(argv[1], "ext", argv[3], djson)) {
21482148
mlog(LV_ERR, "E-2073: imapfile_write %s/ext/%s failed", argv[1], argv[3]);
@@ -2241,7 +2241,7 @@ static int me_minst(int argc, char **argv, int sockd) try
22412241
ec_error_t e_result = ecRpcFailed;
22422242
uint64_t outmid = 0, outcn = 0;
22432243
if (!exmdb_client->write_message(argv[1], cpid,
2244-
rop_util_make_eid_ex(1, folder_id), pmsgctnt, {},
2244+
rop_util_make_eid_ex(1, folder_id), pmsgctnt, djson.c_str(),
22452245
&outmid, &outcn, &e_result) || e_result != ecSuccess)
22462246
return MIDB_E_MDB_WRITEMESSAGE;
22472247
return cmd_write(sockd, "TRUE\r\n");

0 commit comments

Comments
 (0)