Added support for SQLite.
[exim.git] / src / src / drtables.c
index 686b395297a40e6d2269f4556b189869eb9bdad4..ec7f5274544a4308e349f9c3b37ec9f19b36d37c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/drtables.c,v 1.3 2005/05/24 08:15:02 tom Exp $ */
+/* $Cambridge: exim/src/src/drtables.c,v 1.5 2005/08/01 13:20:28 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -89,6 +89,14 @@ be NULL for methods that don't need them. */
 #include "lookups/pgsql.h"
 #endif
 
+#ifdef EXPERIMENTAL_SPF
+#include "lookups/spf.h"
+#endif
+
+#ifdef LOOKUP_SQLITE
+#include "lookups/sqlite.h"
+#endif
+
 #ifdef LOOKUP_TESTDB
 #include "lookups/testdb.h"
 #endif
@@ -437,6 +445,40 @@ Shares many functions with lsearch. */
 #endif
   },
 
+/* SPF lookup */
+
+  {
+  US"spf",                       /* lookup name */
+  0,                             /* not absfile, not query style */
+#ifdef EXPERIMENTAL_SPF
+  spf_open,                      /* open function */
+  NULL,                          /* no check function */
+  spf_find,                      /* find function */
+  spf_close,                     /* close function */
+  NULL,                          /* no tidy function */
+  NULL                           /* no quoting function */
+#else
+  NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
+#endif
+  },
+
+/* sqlite lookup */
+
+  {
+  US"sqlite",                    /* lookup name */
+  lookup_absfilequery,           /* query-style lookup, starts with file name */
+#ifdef LOOKUP_SQLITE
+  sqlite_open,                   /* open function */
+  NULL,                          /* no check function */
+  sqlite_find,                   /* find function */
+  sqlite_close,                  /* close function */
+  NULL,                          /* no tidy function */
+  sqlite_quote                   /* quoting function */
+#else
+  NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
+#endif
+  },
+
 /* Testdb lookup is for testing Exim, not useful for normal running.
 For that reason, we omit the entry entirely when not building it into
 the binary, so that attempts to use it give "unknown lookup type" instead