changeset 535:ee2b977d4a5a

find_email_adr bugfixing and a sanity check. And 1.2.11
author mmj
date Tue, 24 Jan 2006 05:08:33 +1100
parents 4f099cb2099b
children ccb245244750
files ChangeLog README VERSION src/find_email_adr.c src/getlistaddr.c
diffstat 5 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jan 19 10:37:58 2006 +1100
+++ b/ChangeLog	Tue Jan 24 05:08:33 2006 +1100
@@ -1,3 +1,8 @@
+1.2.11
+ o Previous fix to find_email_adr() was incomplete, so in some
+   cases mails would get rejected due to the To: or Cc: rule. Thanks
+   again lcars for finding this
+ o Sanity check to make sure there's a '@' in listaddress
 1.2.10
  o Fix nasty bug in the new 1.2.9 find_email_adr() making comma in
    quoted text in From: being discarded as invalid
--- a/README	Thu Jan 19 10:37:58 2006 +1100
+++ b/README	Tue Jan 24 05:08:33 2006 +1100
@@ -1,4 +1,4 @@
-README mlmmj-1.2.10					         Jan 17th 2005
+README mlmmj-1.2.11					         Jan 23rd 2005
 
 This is an attempt at implementing a mailing list manager with the same
 functionality as the brilliant ezmlm, but with a decent license and mail server
--- a/VERSION	Thu Jan 19 10:37:58 2006 +1100
+++ b/VERSION	Tue Jan 24 05:08:33 2006 +1100
@@ -1,1 +1,1 @@
-1.2.10
+1.2.11
--- a/src/find_email_adr.c	Thu Jan 19 10:37:58 2006 +1100
+++ b/src/find_email_adr.c	Tue Jan 24 05:08:33 2006 +1100
@@ -214,7 +214,7 @@
 					goto oncemore;
 				}
 			}
-			if(c2 && c2 < p) {
+			if(c1 == NULL || (c2 && c2 < p)) {
 				*p = '\0';
 				p += 1;
 			} else {
--- a/src/getlistaddr.c	Thu Jan 19 10:37:58 2006 +1100
+++ b/src/getlistaddr.c	Tue Jan 24 05:08:33 2006 +1100
@@ -54,6 +54,11 @@
 		exit(EXIT_FAILURE);
 	}
 
+	if(strchr(tmpstr, '@') == NULL) {
+		log_error(LOG_ARGS, "FATAL. No @ sign in listaddress");
+		exit(EXIT_FAILURE);
+	}
+
 	chomp(tmpstr);
 	close(listnamefd);