
these patches are relative to smail-3.0.2.101, but should fit into any
version of smail.

once you have patched smail, you need to put a "rbl_domain" setting in your
config file, such as "rbl_domain=rbl.maps.vix.com".

i have submitted this to be added to the smail distribution.

use at your own risk.

jim@reptiles.org

-------------------------

*** config.c	Wed Jan 21 11:20:28 1998
--- config.c.prev	Wed Jan 21 11:20:02 1998
***************
*** 28,34 ****
  #endif
  
  char *listen_name = NULL; 		/* DNS name of interface to listen on */
- char *rbl_domain = NULL; 		/* DNS domain for RBL lockout */
  char *visible_name = VISIBLE_NAME;	/* hostname used in outgoing addrs */
  char *visible_domains = VISIBLE_DOMAINS; /* domain used in outgoing headers */
  char *uucp_name = UUCP_NAME;		/* hostname used in !-routes */
--- 28,33 ----
*** smailconf.c	Wed Jan 21 11:20:33 1998
--- smailconf.c.prev	Wed Jan 21 11:20:02 1998
***************
*** 91,97 ****
      { "hostnames", t_string, NULL, (tup *)&hostnames, 0 },
      { "hostname", t_string, NULL, (tup *)&hostnames, 0 },
      { "listen_name", t_string, NULL, (tup *)&listen_name, 0 },
-     { "rbl_domain", t_string, NULL, (tup *)&rbl_domain, 0 },
      { "lock_by_name", t_boolean, NULL, (tup *)&lock_by_name, 0 },
      { "lock_mode", t_mode, NULL, (tup *)&lock_mode, 0 },
      { "log_mode", t_mode, NULL, (tup *)&log_mode, 0 },
--- 91,96 ----
*** smtprecv.c	Wed Jan 21 11:20:43 1998
--- smtprecv.c.prev	Wed Jan 21 11:20:02 1998
***************
*** 207,215 ****
      struct sockaddr_in from_sa;
      int from_sa_len = sizeof(from_sa);
      struct hostent *shp = NULL;		/* result of gethostbyaddr() */
- 	char *rbl_addr;
- 	char rbl_host[128];
- 	struct hostent *rbl_p = NULL;
  
  
  # ifndef OBSOLETE_RESOLVER
--- 207,212 ----
***************
*** 328,352 ****
  	   sender_host_addr ? sender_host_addr : "<unset>",
  	   sender_host_really ? sender_host_really : "<unknown>",
  	   smtp_local_net ? smtp_local_net : "<unset>");
- 
- 	if (sender_host_addr && rbl_domain) {
-     	rbl_addr = (unsigned char *)&from_sa.sin_addr;
- 
-     	sprintf(rbl_host, "%d.%d.%d.%d.%s",
-         	rbl_addr[3] & 0xff,
-         	rbl_addr[2] & 0xff,
-         	rbl_addr[1] & 0xff,
-         	rbl_addr[0] & 0xff,
- 			rbl_domain);
- 
- 		if ((rbl_p = gethostbyname(rbl_host)) != NULL) {
- 			fprintf(out, "550 You are not permitted to send mail - %s\r\n",
- 				rbl_host);
- 			fflush(out);
- 			write_log(LOG_SYS, "connection refused from %s because of RBL",
- 				inet_ntoa(from_sa.sin_addr));
- 			smtp_sig_unlink(1);
- 		}
  }
  #endif /* HAVE_BSD_NETWORKING */
  
--- 325,330 ----
