comparison src/masqmail.c @ 267:8be687c06c20

comments (should we really exit failure in this case?) see code
author markus schnalke <meillo@marmaro.de>
date Fri, 03 Dec 2010 11:37:01 -0300
parents ab39047ffe44
children 7b12d081b939
comparison
equal deleted inserted replaced
266:ab39047ffe44 267:8be687c06c20
261 if (!spool_write(msg, TRUE)) { 261 if (!spool_write(msg, TRUE)) {
262 fprintf(stderr, "Could not write spool file\n"); 262 fprintf(stderr, "Could not write spool file\n");
263 exit(1); 263 exit(1);
264 } 264 }
265 265
266 /* here the mail is queued and thus in our responsibility */
266 logwrite(LOG_NOTICE, "%s <= %s with %s\n", msg->uid, addr_string(msg->return_path), prot_names[PROT_LOCAL]); 267 logwrite(LOG_NOTICE, "%s <= %s with %s\n", msg->uid, addr_string(msg->return_path), prot_names[PROT_LOCAL]);
267 268
268 if (conf.do_queue) { 269 if (conf.do_queue) {
269 /* we're finished as we only need to queue it */ 270 /* we're finished as we only need to queue it */
270 return; 271 return;
279 fclose(stdout); 280 fclose(stdout);
280 fclose(stderr); 281 fclose(stderr);
281 if (deliver(msg)) { 282 if (deliver(msg)) {
282 exit(0); 283 exit(0);
283 } else { 284 } else {
285 /*
286 TODO:
287 Should we really fail here? Because the mail is queued
288 already. If we fail the client might submit it again.
289 If at-once-delivery is seen as an additional best-effort
290 service, then we should still exit successful here.
291 */
284 exit(1); 292 exit(1);
285 } 293 }
286 } 294 }
287 } 295 }
288 296