Skip to content

Commit 8c38300

Browse files
committed
exmdb: set PR_MESSAGE_RECIP_ME on delivered messages
Fixes: gromox-0~666 References: GXL-412, DESK-1056, DESK-2057, DESK-3100
1 parent e0eaa4f commit 8c38300

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

exch/exmdb/message.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3720,12 +3720,17 @@ BOOL exmdb_server::deliver_message(const char *dir, const char *from_address,
37203720
return false;
37213721
}
37223722
auto rcpt_type = detect_rcpt_type(account.c_str(), pmsg->children.prcpts);
3723-
if (rcpt_type != MAPI_BCC) {
3723+
if (rcpt_type == MAPI_TO || rcpt_type == MAPI_CC) {
37243724
err = cu_set_propval(&tmp_msg.proplist, rcpt_type == MAPI_TO ?
37253725
PR_MESSAGE_TO_ME : PR_MESSAGE_CC_ME, &fake_true);
37263726
if (err != ecSuccess)
37273727
return false;
37283728
}
3729+
if (rcpt_type == MAPI_TO || rcpt_type == MAPI_CC || rcpt_type == MAPI_BCC) {
3730+
err = cu_set_propval(&tmp_msg.proplist, PR_MESSAGE_RECIP_ME, &fake_true);
3731+
if (err != ecSuccess)
3732+
return false;
3733+
}
37293734
}
37303735
auto nt_time = rop_util_current_nttime();
37313736
auto ts = tmp_msg.proplist.get<uint64_t>(PR_MESSAGE_DELIVERY_TIME);

include/gromox/mapitags.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ enum {
134134
// PR_ORIGINAL_AUTHOR_SEARCH_KEY = PROP_TAG(PT_BINARY, 0x0056), /* PidTagOriginalAuthorSearchKey */
135135
PR_MESSAGE_TO_ME = PROP_TAG(PT_BOOLEAN, 0x0057), /* PidTagMessageToMe */
136136
PR_MESSAGE_CC_ME = PROP_TAG(PT_BOOLEAN, 0x0058), /* PidTagMessageCcMe */
137-
// PR_MESSAGE_RECIP_ME = PROP_TAG(PT_BOOLEAN, 0x0059), /* PidTagMessageRecipientMe */
137+
PR_MESSAGE_RECIP_ME = PROP_TAG(PT_BOOLEAN, 0x0059), /* PidTagMessageRecipientMe */
138138
// PR_ORIGINAL_SENDER_NAME = PROP_TAG(PT_UNICODE, 0x005A), /* PidTagOriginalSenderName */
139139
// PR_ORIGINAL_SENDER_ENTRYID = PROP_TAG(PT_BINARY, 0x005B), /* PidTagOriginalSenderEntryId */
140140
// PR_ORIGINAL_SENDER_SEARCH_KEY = PROP_TAG(PT_BINARY, 0x005C), /* PidTagOriginalSenderSearchKey */

0 commit comments

Comments
 (0)