Fixed handling of the extra_to_field header

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2021-12-16 10:40:26 +01:00
parent 376d095c54
commit c274e21823
2 changed files with 2 additions and 1 deletions

View File

@ -457,7 +457,7 @@ int parse_line(char *buf, struct parser_state *state, struct session_data *sdata
state->received_header++;
}
else if(cfg->extra_to_field[0] != '\0' && strncasecmp(buf, cfg->extra_to_field, strlen(cfg->extra_to_field)) == 0){
state->message_state = MSG_TO;
state->message_state = MSG_RECIPIENT;
buf += strlen(cfg->extra_to_field);
}

View File

@ -153,6 +153,7 @@ int main(int argc, char **argv){
printf("from: *%s (%s)*\n", state.b_from, state.b_from_domain);
printf("sender: *%s (%s)*\n", state.b_sender, state.b_sender_domain);
printf("to: *%s (%s)*\n", state.b_to, state.b_to_domain);
printf("journal recipients: *%s*\n", state.b_journal_to);
printf("reference: *%s*\n", state.reference);
printf("subject: *%s*\n", state.b_subject);
printf("body: *%s*\n", state.b_body);