masqmail-0.2

diff 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 52c82d755215
line diff
     1.1 --- a/src/smtp_out.c	Thu Jul 01 13:09:40 2010 +0200
     1.2 +++ b/src/smtp_out.c	Thu Jul 01 13:11:38 2010 +0200
     1.3 @@ -363,10 +363,12 @@
     1.4  	ptr = data;
     1.5  	while (*ptr) {
     1.6  		int c = (int) (*ptr);
     1.7 -		if (c == '.')
     1.8 -			if (new_line)
     1.9 -				putc('.', psb->out);
    1.10 +		if (c == '.' && new_line) {
    1.11 +			/* dot-stuffing */
    1.12 +			putc('.', psb->out);
    1.13 +		}
    1.14  		if (c == '\n') {
    1.15 +			/* CRLF line terminators */
    1.16  			putc('\r', psb->out);
    1.17  			putc('\n', psb->out);
    1.18  			new_line = TRUE;
    1.19 @@ -722,7 +724,9 @@
    1.20  	}
    1.21  
    1.22  	if (ok) {
    1.23 -		smtp_cmd_mailfrom(psb, return_path, psb->use_size ? size + SMTP_SIZE_ADD : 0);
    1.24 +		/* pretend the message is a bit larger,
    1.25 +		   just in case the size calculation is buggy */
    1.26 +		smtp_cmd_mailfrom(psb, return_path, psb->use_size ? size+SMTP_SIZE_ADD : 0);
    1.27  
    1.28  		if (!psb->use_pipelining) {
    1.29  			if ((ok = read_response(psb, SMTP_CMD_TIMEOUT)))