diff src/dnsbl.cpp @ 174:da0c41b9f672

don't whitelist addresses with embedded spaces
author carl
date Sun, 23 Sep 2007 11:20:12 -0700
parents 83fe0be032c1
children a4d313c2460b
line wrap: on
line diff
--- a/src/dnsbl.cpp	Thu Sep 06 09:50:05 2007 -0700
+++ b/src/dnsbl.cpp	Sun Sep 23 11:20:12 2007 -0700
@@ -984,6 +984,13 @@
 	CONFIG &dc = *priv.pc;
 	char  *rcptaddr  = rcpt[0];
 	char  *loto 	 = to_lower_string(rcptaddr);
+
+	// some version of sendmail allowed rcpt to:<> and passed it thru to the milters
+	if (strcmp(loto, "<>") == 0) {
+		smfi_setreply(ctx, "550", "5.7.1", "bogus recipient");
+		return SMFIS_REJECT;
+	}
+
 	if (priv.assassin) priv.assassin->mlfi_envrcpt(ctx, loto);
 	// priv.mailaddr sending original message to loto
 	CONTEXT 	&con = *(dc.find_context(loto)->find_context(priv.mailaddr));