Remove deprecated "dkim" lookup in favor of ACL-style system
authorTom Kistner <tom@duncanthrax.net>
Tue, 19 May 2009 08:24:47 +0000 (08:24 +0000)
committerTom Kistner <tom@duncanthrax.net>
Tue, 19 May 2009 08:24:47 +0000 (08:24 +0000)
src/src/dkim.c
src/src/drtables.c
src/src/lookups/Makefile
src/src/lookups/dkim.c [deleted file]
src/src/lookups/dkim.h [deleted file]

index fe536d9caa0dbf00c40bf9ee73258141fd24214e..68cae73eb1907568fa977567d4206ac085083f30 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/dkim.c,v 1.1.2.7 2009/04/30 08:21:30 tom Exp $ */
+/* $Cambridge: exim/src/src/dkim.c,v 1.1.2.8 2009/05/19 08:24:47 tom Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -87,7 +87,24 @@ int dkim_exim_verify_finish(void) {
   if (pdkim_feed_finish(dkim_verify_ctx,&dkim_signatures) != PDKIM_OK) return 0;
 
   while (dkim_signatures != NULL) {
-    debug_printf("DKIM: Signature from domain '%s': ",dkim_signatures->domain);
+    uschar *dkim_log = string_sprintf("DKIM: v=%u d=%s s=%s c=%s/%s a=%s ",
+                                      dkim_signatures->version,
+                                      dkim_signatures->domain,
+                                      dkim_signatures->selector,
+                                      (dkim_signatures->canon_headers == PDKIM_CANON_SIMPLE)?"simple":"relaxed",
+                                      (dkim_signatures->canon_body    == PDKIM_CANON_SIMPLE)?"simple":"relaxed",
+                                      (dkim_signatures->algo          == PDKIM_ALGO_RSA_SHA256)?"rsa-sha256":"rsa-sha1"
+
+
+                                      (dkim_signatures->identity != NULL)?dkim_signatures->identity:"<void>",
+                                      (dkim_signatures->created>0)?
+
+                                      );
+
+    dkim_log = string_cat(dkim_log);
+
+
+
     switch(dkim_signatures->verify_status) {
       case PDKIM_VERIFY_NONE:
         debug_printf("not verified\n");
index 34431a47f3ed90744e577656dcd73e694b7de937..a384cdbf62b00ae82dcb2cdd524d9e314a2b5aa2 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/drtables.c,v 1.9.2.1 2009/02/24 15:57:55 tom Exp $ */
+/* $Cambridge: exim/src/src/drtables.c,v 1.9.2.2 2009/05/19 08:24:48 tom Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -105,11 +105,6 @@ be NULL for methods that don't need them. */
 #include "lookups/whoson.h"
 #endif
 
-#ifndef DISABLE_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,
@@ -176,23 +171,6 @@ of the key strings. */
 #endif
   },
 
-/* DKIM lookups */
-
-  {
-  US"dkim",                      /* lookup name */
-  lookup_querystyle,             /* query style */
-#ifndef DISABLE_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 */
 
   {
index 48d208d0221aa7cabe2e0f28e5280cb3f662a0fc..324e334ead69b0a77f5f4886ccb72f45ffcf44f1 100644 (file)
@@ -1,11 +1,11 @@
-# $Cambridge: exim/src/src/lookups/Makefile,v 1.8 2008/02/14 13:49:35 fanf2 Exp $
+# $Cambridge: exim/src/src/lookups/Makefile,v 1.8.2.1 2009/05/19 08:24:48 tom Exp $
 
 # Make file for building a library containing all the available lookups and
 # calling it lookups.a. This is called from the main make file, after cd'ing
 # to the lookups subdirectory. When the relevant LOOKUP_ macros are not
 # defined, dummy modules get compiled.
 
-OBJ = cdb.o dbmdb.o dkim.o dnsdb.o dsearch.o ibase.o ldap.o lsearch.o mysql.o nis.o \
+OBJ = cdb.o dbmdb.o dnsdb.o dsearch.o ibase.o ldap.o lsearch.o mysql.o nis.o \
       nisplus.o oracle.o passwd.o pgsql.o spf.o sqlite.o testdb.o whoson.o \
       lf_check_file.o lf_quote.o lf_sqlperform.o
 
@@ -25,7 +25,6 @@ lf_sqlperform.o: $(HDRS) lf_sqlperform.c  lf_functions.h
 
 cdb.o:           $(HDRS) cdb.c       cdb.h
 dbmdb.o:         $(HDRS) dbmdb.c     dbmdb.h
-dkim.o:                 $(HDRS) dkim.c      dkim.h
 dnsdb.o:         $(HDRS) dnsdb.c     dnsdb.h
 dsearch.o:       $(HDRS) dsearch.c   dsearch.h
 ibase.o:         $(HDRS) ibase.c     ibase.h
diff --git a/src/src/lookups/dkim.c b/src/src/lookups/dkim.c
deleted file mode 100755 (executable)
index 52f2d88..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* $Cambridge: exim/src/src/lookups/dkim.c,v 1.1.2.1 2009/02/24 15:57:55 tom Exp $ */
-
-/*************************************************
-*     Exim - an Internet mail transport agent    *
-*************************************************/
-
-/* Copyright (c) University of Cambridge 1995 - 2007 */
-/* See the file NOTICE for conditions of use and distribution. */
-
-#include "../exim.h"
-#include "dkim.h"
-
-
-
-/*************************************************
-*              Open entry point                  *
-*************************************************/
-
-/* See local README for interface description */
-
-void *
-dkim_open(uschar *filename, uschar **errmsg)
-{
-filename = filename;     /* Keep picky compilers happy */
-errmsg = errmsg;
-return (void *)(-1);     /* Just return something non-null */
-}
-
-
-
-
-/*************************************************
-*         Find entry point for passwd           *
-*************************************************/
-
-/* See local README for interface description */
-
-int
-dkim_find(void *handle, uschar *filename, uschar *keystring, int length,
-  uschar **result, uschar **errmsg, BOOL *do_cache)
-{
-#ifndef DISABLE_DKIM
-  dkim_exim_verify_result(keystring,result,errmsg);
-  return OK;
-#else
-  *errmsg = US"DKIM support not compiled.";
-  *result = US"unverified";
-  return FAIL;
-#endif
-}
-
-/* End of lookups/dkim.c */
diff --git a/src/src/lookups/dkim.h b/src/src/lookups/dkim.h
deleted file mode 100755 (executable)
index 6e07142..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/* $Cambridge: exim/src/src/lookups/dkim.h,v 1.1 2007/09/28 12:21:57 tom Exp $ */
-
-/*************************************************
-*     Exim - an Internet mail transport agent    *
-*************************************************/
-
-/* Copyright (c) University of Cambridge 1995 - 2007 */
-/* See the file NOTICE for conditions of use and distribution. */
-
-/* Header for the DKIM lookup */
-
-extern void *dkim_open(uschar *, uschar **);
-extern int   dkim_find(void *, uschar *, uschar *, int, uschar **, uschar **,
-               BOOL *);
-
-/* End of lookups/dkim.h */