diff src/context.cpp @ 101:6ac7ba4a8312 stable-5-9

fix <> passed as <<>> to verification hosts
author carl
date Mon, 26 Sep 2005 20:40:29 -0700
parents 63e8633abc34
children aa07452e641b
line wrap: on
line diff
--- a/src/context.cpp	Sun Sep 25 08:38:29 2005 -0700
+++ b/src/context.cpp	Mon Sep 26 20:40:29 2005 -0700
@@ -187,12 +187,16 @@
 
 
 int SMTP::from(char *f) {
+	// the mail from address was originally passed in from sendmail enclosed in
+	// <>. to_lower_string() removed the <> and converted the rest to lowercase,
+	// except in the case of an empty return path, which was left as the two
+	// character string <>.
 	if (strncmp(efrom, f, maxlen)) {
 		rset();
 		strncpy(efrom, f, maxlen);
 		init();
 		append("MAIL FROM:<");
-		append(f);
+		if (*f != '<') append(f);
 		append(">");
 		return cmd(NULL);
 	}