Mercurial > masqmail
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 | a39c8ee61185 |
line wrap: on
line diff
--- a/src/smtp_out.c Thu Jul 01 13:09:40 2010 +0200 +++ b/src/smtp_out.c Thu Jul 01 13:11:38 2010 +0200 @@ -363,10 +363,12 @@ ptr = data; while (*ptr) { int c = (int) (*ptr); - if (c == '.') - if (new_line) - putc('.', psb->out); + if (c == '.' && new_line) { + /* dot-stuffing */ + putc('.', psb->out); + } if (c == '\n') { + /* CRLF line terminators */ putc('\r', psb->out); putc('\n', psb->out); new_line = TRUE; @@ -722,7 +724,9 @@ } if (ok) { - smtp_cmd_mailfrom(psb, return_path, psb->use_size ? size + SMTP_SIZE_ADD : 0); + /* pretend the message is a bit larger, + just in case the size calculation is buggy */ + smtp_cmd_mailfrom(psb, return_path, psb->use_size ? size+SMTP_SIZE_ADD : 0); if (!psb->use_pipelining) { if ((ok = read_response(psb, SMTP_CMD_TIMEOUT)))