| 352 | } |
| 353 | |
| 354 | static void mail_rcpt(MIME_NODE *node, const HEADER_OPTS *header_info) |
| 355 | { |
| 356 | TOK822 *tree; |
| 357 | TOK822 **addr_list; |
| 358 | TOK822 **tpp; |
| 359 | ACL_VSTRING *temp; |
| 360 | const char *cp; |
| 361 | |
| 362 | temp = acl_vstring_alloc(10); |
| 363 | cp = STR(node->buffer) + strlen(header_info->name) + 1; |
| 364 | tree = tok822_parse(cp); |
| 365 | addr_list = tok822_grep(tree, TOK822_ADDR); |
| 366 | for (tpp = addr_list; *tpp; tpp++) { |
| 367 | tok822_internalize(temp, tpp[0]->head, TOK822_STR_DEFL); |
| 368 | if (header_info->type == HDR_TO) { |
| 369 | node->header_to_list = |
| 370 | mail_addr_add(node->header_to_list, STR(temp)); |
| 371 | } else if (header_info->type == HDR_CC) { |
| 372 | node->header_cc_list = |
| 373 | mail_addr_add(node->header_cc_list, STR(temp)); |
| 374 | } else if (header_info->type == HDR_BCC) { |
| 375 | node->header_bcc_list = |
| 376 | mail_addr_add(node->header_bcc_list, STR(temp)); |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | acl_myfree(addr_list); |
| 381 | tok822_free_tree(tree); |
| 382 | acl_vstring_free(temp); |
| 383 | } |
| 384 | |
| 385 | static void mail_from(MIME_NODE *node, const HEADER_OPTS *header_info) |
| 386 | { |
no test coverage detected
searching dependent graphs…