Leading white space used to be stripped from $spam_report which
[exim.git] / src / src / drtables.c
index 686b395297a40e6d2269f4556b189869eb9bdad4..b95d4fc952a0f1ba72d13e8bad0823c82d1bcbb3 100644 (file)
@@ -1,10 +1,10 @@
-/* $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.9 2007/09/28 12:21:57 tom Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2005 */
+/* Copyright (c) University of Cambridge 1995 - 2007 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -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
@@ -97,6 +105,11 @@ be NULL for methods that don't need them. */
 #include "lookups/whoson.h"
 #endif
 
+#ifdef EXPERIMENTAL_DKIM
+#include "lookups/dkim.h"
+#endif
+
+
 /* The second field in each item below is a set of bit flags:
 
   lookup_querystyle     => this is a query-style lookup,
@@ -163,6 +176,23 @@ of the key strings. */
 #endif
   },
 
+/* DKIM lookups */
+
+  {
+  US"dkim",                      /* lookup name */
+  lookup_querystyle,             /* query style */
+#ifdef EXPERIMENTAL_DKIM
+  dkim_open,                     /* open function */
+  NULL,                          /* check function */
+  dkim_find,                     /* find function */
+  NULL,                          /* no close function */
+  NULL,                          /* no tidy function */
+  NULL                           /* no quoting function */
+#else
+  NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
+#endif
+  },
+
 /* Using DNS TXT records as a database */
 
   {
@@ -437,6 +467,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
@@ -509,6 +573,10 @@ set to NULL for those that are not compiled into the binary. */
 #include "auths/cyrus_sasl.h"
 #endif
 
+#ifdef AUTH_DOVECOT
+#include "auths/dovecot.h"
+#endif
+
 #ifdef AUTH_PLAINTEXT
 #include "auths/plaintext.h"
 #endif
@@ -547,6 +615,19 @@ auth_info auths_available[] = {
   },
 #endif
 
+#ifdef AUTH_DOVECOT
+  {
+  US"dovecot",                                /* lookup name */
+  auth_dovecot_options,
+  &auth_dovecot_options_count,
+  &auth_dovecot_option_defaults,
+  sizeof(auth_dovecot_options_block),
+  auth_dovecot_init,                          /* init function */
+  auth_dovecot_server,                        /* server function */
+  NULL                                        /* client function */
+  },
+#endif
+
 #ifdef AUTH_PLAINTEXT
   {
   US"plaintext",                             /* lookup name */