comparison src/deliver.c @ 179:3190e6864452

added comments to deliver.c (stuff to check)
author meillo@marmaro.de
date Wed, 14 Jul 2010 17:02:08 +0200
parents 91f8ee6514f5
children dc89737b27aa
comparison
equal deleted inserted replaced
178:91f8ee6514f5 179:3190e6864452
328 logwrite(LOG_ALERT, "Ooops: empty list of messages in deliver_msglist_host()\n"); 328 logwrite(LOG_ALERT, "Ooops: empty list of messages in deliver_msglist_host()\n");
329 return FALSE; 329 return FALSE;
330 } 330 }
331 331
332 if (host == NULL) { 332 if (host == NULL) {
333 /* XXX: what if mail_host isn't set? Is this possible? */
333 host = route->mail_host->address; 334 host = route->mail_host->address;
334 port = route->mail_host->port; 335 port = route->mail_host->port;
335 } 336 }
336 337
337 #ifdef ENABLE_POP3 338 #ifdef ENABLE_POP3
341 } 342 }
342 #endif 343 #endif
343 344
344 if ((psb = (route->wrapper ? smtp_out_open_child(route->wrapper) : smtp_out_open(host, port, res_list)))) { 345 if ((psb = (route->wrapper ? smtp_out_open_child(route->wrapper) : smtp_out_open(host, port, res_list)))) {
345 346
346 if (route->wrapper) 347 if (route->wrapper) {
348 /* it seems as if the remote_host is only set for logging
349 /* XXX: this could probably be moved into smtp_out_open_child() */
347 psb->remote_host = host; 350 psb->remote_host = host;
351 }
348 352
349 set_heloname(psb, route->helo_name ? route->helo_name : conf.host_name, route->do_correct_helo); 353 set_heloname(psb, route->helo_name ? route->helo_name : conf.host_name, route->do_correct_helo);
350 354
351 #ifdef ENABLE_AUTH 355 #ifdef ENABLE_AUTH
352 if ((route->auth_name) && (route->auth_login) && (route->auth_secret)) 356 if ((route->auth_name) && (route->auth_login) && (route->auth_secret))
462 { 466 {
463 gboolean ok = FALSE; 467 gboolean ok = FALSE;
464 468
465 DEBUG(5) debugf("deliver_route_msgout_list entered, route->name = %s\n", route->name); 469 DEBUG(5) debugf("deliver_route_msgout_list entered, route->name = %s\n", route->name);
466 470
467 if (route->mail_host != NULL) { 471 if (route->mail_host) {
468 /* this is easy... */ 472 /* this is easy... deliver everything to a smart host for relay */
469 if (deliver_msglist_host(route, msgout_list, NULL, route->resolve_list)) 473 if (deliver_msglist_host(route, msgout_list, NULL, route->resolve_list))
470 ok = TRUE; 474 ok = TRUE;
471 475
472 } else { 476 } else {
473 /* this is not easy... */ 477 /* this is not easy... */