Since I didn't see any in the mailing list archives, here are some diffs
to patch rblsmtpd to support multiple RBL's.  Caveat is that I've only
been using these for speed testing different RBL schemes, but it does seem
to work as intended.  You can test it with something like...

$ TCPREMOTEIP=127.0.0.2 ./rblsmtpd -rdul.map.vix.com -rrbl.maps.vix.com /bin/id

diff -c -r rblsmtpd-0.70/rblsmtpd.c rblsmtpd-0.70-local//rblsmtpd.c
*** rblsmtpd-0.70/rblsmtpd.c    Tue Aug 25 08:58:22 1998
--- rblsmtpd-0.70-local//rblsmtpd.c     Mon Jun 14 10:26:15 1999
***************
*** 10,15 ****
--- 10,17 ----
  #include "ip.h"
  #include "env.h"
  
+ #define MAX_RBL_DOMAINS 8
+ 
  #define FATAL "rblsmtpd: fatal: "
  void die_sys() { _exit(111); }
  
***************
*** 109,114 ****
--- 111,119 ----
  char **argv;
  {
    int opt;
+   int rblcnt = 0;
+   int i;
+   char * rbldoms[MAX_RBL_DOMAINS];
  
    while ((opt = getopt(argc,argv,"t:r:Rb")) != opteof)
      switch(opt) {
***************
*** 115,121 ****
        case 't': scan_uint(optarg,&timeout); break;
        case 'R': flagrblsafe = 1; break;
        case 'b': flagbounce = 1; break;
!       case 'r': rbldomain = optarg; break;
        default: usage();
      }
    argv += optind;
--- 120,126 ----
        case 't': scan_uint(optarg,&timeout); break;
        case 'R': flagrblsafe = 1; break;
        case 'b': flagbounce = 1; break;
!       case 'r': if (rblcnt < MAX_RBL_DOMAINS) rbldoms[rblcnt++] = optarg; break;
        default: usage();
      }
    argv += optind;
***************
*** 122,128 ****
    if (!*argv) usage();
  
    res_init();
!   check();
    execvp(*argv,argv);
    strerr_die4sys(111,FATAL,"unable to run ",*argv,": ");
  }
--- 127,140 ----
    if (!*argv) usage();
  
    res_init();
!   if (rblcnt == 0) {
!       check();
!   } else {
!       for (i=0; i<rblcnt; i++) {
!               rbldomain = rbldoms[i];
!               check();
!       }
!   }
    execvp(*argv,argv);
    strerr_die4sys(111,FATAL,"unable to run ",*argv,": ");
  }

-- 
Aaron Nabil

Reply via email to