1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-06 03:50:08 +02:00

ignore bcc, fixes #152

This commit is contained in:
B. Petersen 2018-04-27 00:26:55 +02:00
parent 84c0fc84a4
commit f7dc1e27d3

View file

@ -992,7 +992,7 @@ void mrmailbox_receive_imf(mrmailbox_t* mailbox, const char* imf_raw_not_termina
mrsqlite3_begin_transaction__(mailbox->m_sql); mrsqlite3_begin_transaction__(mailbox->m_sql);
transaction_pending = 1; transaction_pending = 1;
/* get From: and check if it is known (for known From:'s we add the other To:/Cc:/Bcc: in the 3rd pass) /* get From: and check if it is known (for known From:'s we add the other To:/Cc: in the 3rd pass)
or if From: is equal to SELF (in this case, it is any outgoing messages, we do not check Return-Path any more as this is unreliable, see issue #150 */ or if From: is equal to SELF (in this case, it is any outgoing messages, we do not check Return-Path any more as this is unreliable, see issue #150 */
if( (field=mrmimeparser_lookup_field(mime_parser, "From"))!=NULL if( (field=mrmimeparser_lookup_field(mime_parser, "From"))!=NULL
&& field->fld_type==MAILIMF_FIELD_FROM) && field->fld_type==MAILIMF_FIELD_FROM)
@ -1024,7 +1024,7 @@ void mrmailbox_receive_imf(mrmailbox_t* mailbox, const char* imf_raw_not_termina
} }
} }
/* Make sure, to_ids starts with the first To:-address (Cc: and Bcc: are added in the loop below pass) */ /* Make sure, to_ids starts with the first To:-address (Cc: is added in the loop below pass) */
if( (field=mrmimeparser_lookup_field(mime_parser, "To"))!=NULL if( (field=mrmimeparser_lookup_field(mime_parser, "To"))!=NULL
&& field->fld_type==MAILIMF_FIELD_TO ) && field->fld_type==MAILIMF_FIELD_TO )
{ {
@ -1043,7 +1043,9 @@ void mrmailbox_receive_imf(mrmailbox_t* mailbox, const char* imf_raw_not_termina
* Add parts * Add parts
*********************************************************************/ *********************************************************************/
/* collect the rest information */ /* collect the rest information, CC: is added to the to-list, BCC: is ignored
(we should not add BCC to groups as this would split groups. We could add them as "known contacts",
however, the benefit is very small and this may leak data that is expected to be hidden) */
if( (field=mrmimeparser_lookup_field(mime_parser, "Cc"))!=NULL && field->fld_type==MAILIMF_FIELD_CC ) if( (field=mrmimeparser_lookup_field(mime_parser, "Cc"))!=NULL && field->fld_type==MAILIMF_FIELD_CC )
{ {
struct mailimf_cc* fld_cc = field->fld_data.fld_cc; struct mailimf_cc* fld_cc = field->fld_data.fld_cc;
@ -1053,15 +1055,6 @@ void mrmailbox_receive_imf(mrmailbox_t* mailbox, const char* imf_raw_not_termina
} }
} }
if( (field=mrmimeparser_lookup_field(mime_parser, "Bcc"))!=NULL && field->fld_type==MAILIMF_FIELD_BCC )
{
struct mailimf_bcc* fld_bcc = field->fld_data.fld_bcc;
if( outgoing && fld_bcc ) {
mrmailbox_add_or_lookup_contacts_by_address_list__(mailbox, fld_bcc->bcc_addr_list,
MR_ORIGIN_OUTGOING_BCC, to_ids, NULL);
}
}
/* check if the message introduces a new chat: /* check if the message introduces a new chat:
- outgoing messages introduce a chat with the first to: address if they are sent by a messenger - outgoing messages introduce a chat with the first to: address if they are sent by a messenger
- incoming messages introduce a chat only for known contacts if they are sent by a messenger - incoming messages introduce a chat only for known contacts if they are sent by a messenger