diff -Nur --exclude=config.h.in --exclude=aclocal.m4 --exclude=configure --exclude=Makefile.in nullmailer-1.00RC7/configure.in nullmailer-1.00RC7-zeroconf2/configure.in
--- nullmailer-1.00RC7/configure.in	Fri Dec 27 15:23:57 2002
+++ nullmailer-1.00RC7-zeroconf2/configure.in	Tue Jan 13 19:59:22 2004
@@ -22,6 +22,10 @@
 AC_CHECK_LIB(xnet, socket)
 AC_CHECK_LIB(inet, socket)
 AC_CHECK_LIB(socket, socket)
+AC_CHECK_LIB(pthread, pthread_mutexattr_init)
+AC_CHECK_LIB(salt, sw_salt_init)
+AC_CHECK_LIB(corby, sw_corby_orb_init)
+AC_CHECK_LIB(rendezvous,sw_rendezvous_browse_services)
 
 dnl Checks for header files.
 AC_HEADER_DIRENT
@@ -29,7 +33,7 @@
 AC_HEADER_SYS_WAIT
 AC_HEADER_TIME
 dnl AC_CHECK_HEADERS(fcntl.h shadow.h crypt.h)
-AC_CHECK_HEADERS(sys/time.h unistd.h)
+AC_CHECK_HEADERS(sys/time.h unistd.h rendezvous/rendezvous.h rendezvous/text_record.h salt/verrno.h salt/log.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 dnl AC_TYPE_UID_T
diff -Nur --exclude=config.h.in --exclude=aclocal.m4 --exclude=configure --exclude=Makefile.in nullmailer-1.00RC7/src/send.cc nullmailer-1.00RC7-zeroconf2/src/send.cc
--- nullmailer-1.00RC7/src/send.cc	Fri Jan  3 21:58:31 2003
+++ nullmailer-1.00RC7-zeroconf2/src/send.cc	Wed Jan 14 20:28:16 2004
@@ -39,6 +39,13 @@
 #include "itoa.h"
 #include "list.h"
 
+#if HAVE_LIBRENDEZVOUS
+#include <rendezvous/rendezvous.h>
+#include <rendezvous/text_record.h>
+#include <salt/salt.h>
+#endif
+
+
 typedef list<mystring> slist;
 
 #define fail(MSG) do { ferr << MSG << endl; return false; } while(0)
@@ -52,6 +59,7 @@
   mystring proto;
   slist options;
   remote(const slist& list);
+  remote(const char * ip, int port);
   ~remote();
 };
 
@@ -71,6 +79,14 @@
   }
 }
 
+remote::remote(const char * ip, int port) {
+  host = mystring(ip);
+  proto = default_proto;
+  mystring portoption = "--port=";
+  portoption += mystring(itoa(port));
+  options.append(portoption);
+}
+
 remote::~remote() { }
 
 typedef list<remote> rlist;
@@ -116,12 +132,136 @@
   return remotes.count() > 0;
 }
 
+#if HAVE_LIBRENDEZVOUS
+
+static sw_result my_resolver(sw_rendezvous_resolve_handler handler,
+                             sw_rendezvous rendezvous,
+                             sw_rendezvous_resolve_id id,
+                             sw_const_string name,
+                             sw_const_string type,
+                             sw_const_string domain,
+                             sw_ipv4_address address,
+                             sw_port port,
+                             sw_const_string text_record_string,
+                             sw_octets text_record,
+                             sw_ulong text_record_len,
+                             sw_opaque extra) {
+  char buf[64];
+  sw_rendezvous_stop_resolve(rendezvous, id);
+  sw_ipv4_address_name(address,buf,64);
+  remotes.append(remote(buf,port));
+  return SW_OKAY;
+}
+
+
+static sw_result my_browser(sw_rendezvous_browse_handler handler,
+                            sw_rendezvous rendezvous,
+                            sw_rendezvous_browse_id id,
+                            sw_rendezvous_browse_status status,
+                            sw_const_string name,
+                            sw_const_string type,
+                            sw_const_string domain,
+                            sw_opaque extra) {
+  sw_rendezvous_resolve_id rid;
+  switch (status) {
+    case SW_RENDEZVOUS_BROWSE_ADD_SERVICE:
+      fout << "add service" << endl;
+      if (sw_rendezvous_resolve(rendezvous,name,type,domain,NULL,my_resolver,NULL,&rid)!=SW_OKAY
+) {
+	fout << "resolve failed" << endl;
+        /* resolve failed */
+      }
+      break;
+    case SW_RENDEZVOUS_BROWSE_INVALID: {
+        // fout << "browse reply: Invalid\n";
+      }
+      break;
+
+    case SW_RENDEZVOUS_BROWSE_RELEASE: {
+        // fout << "browse reply: Release\n";
+      }
+      break;
+
+    case SW_RENDEZVOUS_BROWSE_ADD_DOMAIN: {
+        // fout << "browse reply: Add Domain\n";
+      }
+      break;
+
+    case SW_RENDEZVOUS_BROWSE_ADD_DEFAULT_DOMAIN: {
+        // fout << "browse reply: Add Default Domain\n";
+      }
+      break;
+
+    case SW_RENDEZVOUS_BROWSE_REMOVE_DOMAIN: {
+        // fout << "browse reply: Remove Domain\n";
+      }
+      break;
+    
+    case SW_RENDEZVOUS_BROWSE_REMOVE_SERVICE: {
+        // fout << "browse reply: Remove Service\n";
+        /* fprintf(stderr, "remove service: %s %s %s\n", name, type, domain); */
+      }
+      break;
+
+    case SW_RENDEZVOUS_BROWSE_RESOLVED: {
+        // fout << "browse reply: Resolved\n";
+      }
+      break;
+    default: {
+        // fout << "OMG, what is this? (" << status << ")" << endl;
+      }
+      break;
+  }
+  return SW_OKAY;
+}
+
+bool load_remotes_via_rendezvous() {
+  sw_rendezvous session;
+  sw_result result;
+  sw_rendezvous_publish_id id;
+  static sw_salt salt;
+
+  if (sw_rendezvous_init(&session) != SW_OKAY) {
+    return false;
+  }
+
+  if (sw_rendezvous_salt(session, &salt) != SW_OKAY) {
+    fout << "sw_rendezvous_salt failed" << endl;
+    return false;
+  }
+
+  if (sw_rendezvous_browse_services(session,"_smtp._tcp.",NULL,NULL,my_browser,NULL,&id)!=SW_OKAY) {
+    fout << "sw_rendezvous_browse_sercies failed" << endl;
+    /* browse services failed */
+    return false;
+  }
+
+  sw_ulong msecs = 0;
+  sw_salt_step(salt,&msecs); /* one for browsing */
+  sw_salt_step(salt,&msecs); /* one for resolving */
+
+  sw_rendezvous_fina(session);
+
+  return remotes.count() > 0;
+}
+
+#endif
+
 bool load_config()
 {
   bool result = true;
 
-  if(!load_remotes())
-    result = false;
+#if HAVE_LIBRENDEZVOUS
+  if (getenv("USE_RENDEZVOUS")) {
+    if (!load_remotes_via_rendezvous())
+      result = false;
+  } else {
+#endif
+    if(!load_remotes())
+      result = false;
+#if HAVE_LIBRENDEZVOUS
+  }
+#endif
   
   if(!config_readint("pausetime", pausetime))
     pausetime = 60;
