dma - Check the parsed recipient address for validity
authorMatthias Schmidt <matthias@dragonflybsd.org>
Mon, 20 Sep 2010 08:34:12 +0000 (10:34 +0200)
committerMatthias Schmidt <matthias@dragonflybsd.org>
Mon, 20 Sep 2010 08:34:12 +0000 (10:34 +0200)
Author: Peter Pentchev <roam@ringlet.net>

libexec/dma/mail.c

index 34b0c4e..16efef1 100644 (file)
@@ -321,7 +321,8 @@ newaddr:
        if (addr == NULL)
                errlog(1, NULL);
 
-       add_recp(queue, addr, 1);
+       if (add_recp(queue, addr, 1) != 0)
+               errlogx(1, "invalid recipient `%s'", addr);
        fprintf(stderr, "parsed `%s'\n", addr);
        goto again;
 }