comparison src/smtp_out.c @ 119:1e2fd87d58ea

some annotations related to mail sending with SMTP SIZE
author meillo@marmaro.de
date Thu, 01 Jul 2010 13:11:38 +0200
parents a80ebfa16cd5
children a39c8ee61185
comparison
equal deleted inserted replaced
118:7f1f364c2a29 119:1e2fd87d58ea
361 This is no longer the case */ 361 This is no longer the case */
362 362
363 ptr = data; 363 ptr = data;
364 while (*ptr) { 364 while (*ptr) {
365 int c = (int) (*ptr); 365 int c = (int) (*ptr);
366 if (c == '.') 366 if (c == '.' && new_line) {
367 if (new_line) 367 /* dot-stuffing */
368 putc('.', psb->out); 368 putc('.', psb->out);
369 }
369 if (c == '\n') { 370 if (c == '\n') {
371 /* CRLF line terminators */
370 putc('\r', psb->out); 372 putc('\r', psb->out);
371 putc('\n', psb->out); 373 putc('\n', psb->out);
372 new_line = TRUE; 374 new_line = TRUE;
373 } else { 375 } else {
374 putc(c, psb->out); 376 putc(c, psb->out);
720 psb->error = smtp_cancel; 722 psb->error = smtp_cancel;
721 ok = FALSE; 723 ok = FALSE;
722 } 724 }
723 725
724 if (ok) { 726 if (ok) {
725 smtp_cmd_mailfrom(psb, return_path, psb->use_size ? size + SMTP_SIZE_ADD : 0); 727 /* pretend the message is a bit larger,
728 just in case the size calculation is buggy */
729 smtp_cmd_mailfrom(psb, return_path, psb->use_size ? size+SMTP_SIZE_ADD : 0);
726 730
727 if (!psb->use_pipelining) { 731 if (!psb->use_pipelining) {
728 if ((ok = read_response(psb, SMTP_CMD_TIMEOUT))) 732 if ((ok = read_response(psb, SMTP_CMD_TIMEOUT)))
729 ok = check_response(psb, FALSE); 733 ok = check_response(psb, FALSE);
730 } 734 }