mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 22:41:59 +01:00
Fixed Sender: and From: lines comparison
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
3d4177e6f3
commit
cbc852e735
14
src/parser.c
14
src/parser.c
@ -73,11 +73,15 @@ struct parser_state parse_message(struct session_data *sdata, int take_into_piec
|
||||
// If both Sender: and From: headers exist, and they are different, then append
|
||||
// the From: address to recipients list to give him access to this email as well
|
||||
|
||||
if(state.b_sender_domain[0] && strcmp(state.b_from, state.b_sender)){
|
||||
char tmpbuf[SMALLBUFSIZE];
|
||||
get_first_email_address_from_string(state.b_from, tmpbuf, sizeof(tmpbuf));
|
||||
tmpbuf[strlen(tmpbuf)] = ' ';
|
||||
add_recipient(tmpbuf, strlen(tmpbuf), sdata, &state, data, cfg);
|
||||
if(state.b_sender_domain[0]){
|
||||
char frombuf[SMALLBUFSIZE];
|
||||
char senderbuf[SMALLBUFSIZE];
|
||||
get_first_email_address_from_string(state.b_from, frombuf, sizeof(frombuf));
|
||||
get_first_email_address_from_string(state.b_sender, senderbuf, sizeof(senderbuf));
|
||||
if(strcmp(frombuf, senderbuf)){
|
||||
frombuf[strlen(frombuf)] = ' ';
|
||||
add_recipient(frombuf, strlen(frombuf), sdata, &state, data, cfg);
|
||||
}
|
||||
}
|
||||
|
||||
return state;
|
||||
|
Loading…
Reference in New Issue
Block a user