Mercurial > masqmail
comparison src/deliver.c @ 370:d86d7b4b8995
Broke long lines.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Tue, 25 Oct 2011 13:50:27 +0200 |
parents | b27f66555ba8 |
children | b0708fac99dd |
comparison
equal
deleted
inserted
replaced
369:19d57eb1b6a1 | 370:d86d7b4b8995 |
---|---|
271 } | 271 } |
272 } | 272 } |
273 } | 273 } |
274 | 274 |
275 gboolean | 275 gboolean |
276 deliver_msglist_host_pipe(connect_route *route, GList *msgout_list, gchar *host, GList *res_list) | 276 deliver_msglist_host_pipe(connect_route *route, GList *msgout_list, |
277 gchar *host, GList *res_list) | |
277 { | 278 { |
278 gboolean ok = TRUE; | 279 gboolean ok = TRUE; |
279 GList *msgout_node; | 280 GList *msgout_node; |
280 | 281 |
281 DEBUG(5) debugf("deliver_msglist_host_pipe entered\n"); | 282 DEBUG(5) debugf("deliver_msglist_host_pipe entered\n"); |
475 destroy_smtpbase(psb); | 476 destroy_smtpbase(psb); |
476 return ok; | 477 return ok; |
477 } | 478 } |
478 | 479 |
479 gboolean | 480 gboolean |
480 deliver_msglist_host(connect_route *route, GList *msgout_list, gchar *host, GList *res_list) | 481 deliver_msglist_host(connect_route *route, GList *msgout_list, gchar *host, |
482 GList *res_list) | |
481 { | 483 { |
482 | 484 |
483 if (route->pipe) { | 485 if (route->pipe) { |
484 DEBUG(5) debugf("with pipe\n"); | 486 DEBUG(5) debugf("with pipe\n"); |
485 return deliver_msglist_host_pipe(route, msgout_list, host, res_list); | 487 return deliver_msglist_host_pipe(route, msgout_list, host, res_list); |
501 | 503 |
502 DEBUG(5) debugf("deliver_route_msgout_list entered, route->name = %s\n", route->name); | 504 DEBUG(5) debugf("deliver_route_msgout_list entered, route->name = %s\n", route->name); |
503 | 505 |
504 if (route->mail_host) { | 506 if (route->mail_host) { |
505 /* this is easy... deliver everything to a smart host for relay */ | 507 /* this is easy... deliver everything to a smart host for relay */ |
506 return deliver_msglist_host(route, msgout_list, NULL, route->resolve_list); | 508 return deliver_msglist_host(route, msgout_list, NULL, |
509 route->resolve_list); | |
507 } | 510 } |
508 | 511 |
509 /* this is not easy... */ | 512 /* this is not easy... */ |
510 | 513 |
511 mo_ph_list = route_msgout_list(route, msgout_list); | 514 mo_ph_list = route_msgout_list(route, msgout_list); |
520 ** messages. Threads could be a solution because they use the same | 523 ** messages. Threads could be a solution because they use the same |
521 ** memory. But we are not thread safe yet... | 524 ** memory. But we are not thread safe yet... |
522 */ | 525 */ |
523 foreach(mo_ph_list, mo_ph_node) { | 526 foreach(mo_ph_list, mo_ph_node) { |
524 msgout_perhost *mo_ph = (msgout_perhost *) (mo_ph_node->data); | 527 msgout_perhost *mo_ph = (msgout_perhost *) (mo_ph_node->data); |
525 if (deliver_msglist_host(route, mo_ph->msgout_list, mo_ph->host, route->resolve_list)) { | 528 if (deliver_msglist_host(route, mo_ph->msgout_list, |
529 mo_ph->host, route->resolve_list)) { | |
526 ok = TRUE; | 530 ok = TRUE; |
527 } | 531 } |
528 destroy_msgout_perhost(mo_ph); | 532 destroy_msgout_perhost(mo_ph); |
529 } | 533 } |
530 g_list_free(mo_ph_list); | 534 g_list_free(mo_ph_list); |
581 } | 585 } |
582 | 586 |
583 /* filter by allowed envelope rcpts */ | 587 /* filter by allowed envelope rcpts */ |
584 GList *rcpt_list_allowed = NULL; | 588 GList *rcpt_list_allowed = NULL; |
585 GList *rcpt_list_notallowed = NULL; | 589 GList *rcpt_list_notallowed = NULL; |
586 route_split_rcpts(route, msgout_cloned->rcpt_list, &rcpt_list_allowed, &rcpt_list_notallowed); | 590 route_split_rcpts(route, msgout_cloned->rcpt_list, |
591 &rcpt_list_allowed, &rcpt_list_notallowed); | |
587 if (!rcpt_list_allowed) { | 592 if (!rcpt_list_allowed) { |
588 destroy_msg_out(msgout_cloned); | 593 destroy_msg_out(msgout_cloned); |
589 continue; | 594 continue; |
590 } | 595 } |
591 | 596 |
592 logwrite(LOG_NOTICE, "%s using '%s'\n", msgout->msg->uid, route->name); | 597 logwrite(LOG_NOTICE, "%s using '%s'\n", msgout->msg->uid, |
598 route->name); | |
593 | 599 |
594 g_list_free(msgout_cloned->rcpt_list); | 600 g_list_free(msgout_cloned->rcpt_list); |
595 msgout_cloned->rcpt_list = rcpt_list_allowed; | 601 msgout_cloned->rcpt_list = rcpt_list_allowed; |
596 | 602 |
597 if (route->last_route) { | 603 if (route->last_route) { |