git: 9front

Download patch

ref: 0f680ca73d159088abcf975456d4e836c63bebb0
parent: 72473748d00fbe34f6a8c37006d13968fc55b9f4
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Feb 22 16:55:41 EST 2016

smtpd: remove unused lastsender logic

--- a/sys/src/cmd/upas/smtp/smtpd.c
+++ b/sys/src/cmd/upas/smtp/smtpd.c
@@ -447,7 +447,6 @@
 sender(String *path)
 {
 	String *s;
-	static char *lastsender;
 
 	if(rejectcheck())
 		return;
@@ -477,23 +476,6 @@
 		reply("501 5.1.3 Bad character in sender address %s.\r\n",
 			s_to_c(path));
 		return;
-	}
-
-	/*
-	 * if the last sender address resulted in a rejection because the sending
-	 * domain didn't exist and this sender has the same domain, reject
-	 * immediately.
-	 */
-	if(lastsender){
-		if (strncmp(lastsender, s_to_c(path), strlen(lastsender)) == 0){
-			filterstate = REFUSED;
-			rejectcount++;
-			reply("554 5.1.8 Sender domain must exist: %s\r\n",
-				s_to_c(path));
-			return;
-		}
-		free(lastsender);	/* different sender domain */
-		lastsender = 0;
 	}
 
 	/*
--