Description: Check the parsed recipient address for validity.
Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
Forwarded: yes
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2010-06-18

--- a/mail.c
+++ b/mail.c
@@ -427,8 +427,8 @@
 	if (addr == NULL)
 		errlog(1, NULL);
 
-	add_recp(queue, addr, 1);
-	fprintf(stderr, "parsed `%s'\n", addr);
+	if (add_recp(queue, addr, 1) != 0)
+		errlogx(1, "invalid recipient `%s'", addr);
 	goto again;
 }
 
