changeset 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 d9c64bafbf60
files ChangeLog dnsbl.spec.in package.bash src/context.cpp xml/dnsbl.in
diffstat 5 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Sep 25 08:38:29 2005 -0700
+++ b/ChangeLog	Mon Sep 26 20:40:29 2005 -0700
@@ -1,5 +1,10 @@
     $Id$
 
+5.9 2005-09-26
+    Fix a bug with empty return paths passed to the verification code.
+    That resulted in 'MAIL FROM:<<>>' being sent to the verification
+    mail server.
+
 5.8 2005-09-25
     Allow empty env_to at global context level to remove restrictions
     on env_to values in child contexts.
--- a/dnsbl.spec.in	Sun Sep 25 08:38:29 2005 -0700
+++ b/dnsbl.spec.in	Mon Sep 26 20:40:29 2005 -0700
@@ -1,6 +1,6 @@
 Summary: DNSBL Sendmail Milter
 Name: dnsbl
-Version: 5.8
+Version: 5.9
 Release: 2
 Copyright: GPL
 Group: System Environment/Daemons
--- a/package.bash	Sun Sep 25 08:38:29 2005 -0700
+++ b/package.bash	Mon Sep 26 20:40:29 2005 -0700
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-VER=dnsbl-5.8
+VER=dnsbl-5.9
 mkdir $VER
     target1=/home/httpd/html/510sg/util/dnsbl.tar.gz
     target2=/home/httpd/html/510sg/dnsbl.conf
--- 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);
 	}
--- a/xml/dnsbl.in	Sun Sep 25 08:38:29 2005 -0700
+++ b/xml/dnsbl.in	Mon Sep 26 20:40:29 2005 -0700
@@ -2,7 +2,7 @@
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<title>DNSBL Sendmail milter - Version 5.8</title>
+<title>DNSBL Sendmail milter - Version 5.9</title>
 </head>
 
 <center>Introduction</center>