changeset 2:bf58106560ba

Carriage returns at ends of messages; more .hgignore for Autotools
author Adam Chlipala <adam@chlipala.net>
date Sat, 27 Dec 2014 07:17:50 -0500
parents db4d025f7bd3
children 9ab026c81a22
files .hgignore mail.c
diffstat 2 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Sat Dec 27 07:13:22 2014 -0500
+++ b/.hgignore	Sat Dec 27 07:17:50 2014 -0500
@@ -16,8 +16,17 @@
 syntax: regexp
 
 ^Makefile$
+^Makefile.in$
+^aclocal.m4$
+^config.*
+^install-sh$
+^ltmain.sh$
+^configure$
 ^libtool$
 ^config.h$
 ^stamp-h1$
 ^compile$
 ^ar-lib$
+^depcomp$
+^m4$
+^missing$
--- a/mail.c	Sat Dec 27 07:13:22 2014 -0500
+++ b/mail.c	Sat Dec 27 07:17:50 2014 -0500
@@ -200,7 +200,7 @@
   for (p = strchr(s, ','); p; p = strchr(p+1, ',')) {
     *p = 0;
 
-    snprintf(out, sizeof(out), "RCPT TO:%s\n", s);
+    snprintf(out, sizeof(out), "RCPT TO:%s\r\n", s);
     out[sizeof(out)-1] = 0;
     *p = ',';
 
@@ -218,7 +218,7 @@
   }
 
   if (*s) {
-    snprintf(out, sizeof(out), "RCPT TO:%s\n", s);
+    snprintf(out, sizeof(out), "RCPT TO:%s\r\n", s);
     out[sizeof(out)-1] = 0;
 
     if (really_string(sock, out) < 0) {
@@ -267,7 +267,7 @@
     return;
   }
 
-  if (really_string(sock, "HELO localhost\n") < 0) {
+  if (really_string(sock, "HELO localhost\r\n") < 0) {
     close(sock);
     uw_set_error_message(j->ctx, "Error sending HELO");
     return;
@@ -279,7 +279,7 @@
     return;
   }
 
-  snprintf(out, sizeof(out), "MAIL FROM:%s\n", j->h->from);
+  snprintf(out, sizeof(out), "MAIL FROM:%s\r\n", j->h->from);
   out[sizeof(out)-1] = 0;
 
   if (really_string(sock, out) < 0) {
@@ -298,7 +298,7 @@
   if (sendAddrs("Cc", j->ctx, sock, j->h->cc, buf, &pos)) return;
   if (sendAddrs("Bcc", j->ctx, sock, j->h->bcc, buf, &pos)) return;
 
-  if (really_string(sock, "DATA\n") < 0) {
+  if (really_string(sock, "DATA\r\n") < 0) {
     close(sock);
     uw_set_error_message(j->ctx, "Error sending DATA");
     return;
@@ -458,7 +458,7 @@
     return;
   }
 
-  if (really_string(sock, "QUIT\n") < 0) {
+  if (really_string(sock, "QUIT\r\n") < 0) {
     close(sock);
     uw_set_error_message(j->ctx, "Error sending QUIT");
     return;