From: Tom Kistner Date: Tue, 19 May 2009 08:24:47 +0000 (+0000) Subject: Remove deprecated "dkim" lookup in favor of ACL-style system X-Git-Url: https://git.exim.org/users/jgh/exim.git/commitdiff_plain/f7c46259cd20a080f47166bf2e4882c8f76c7e71 Remove deprecated "dkim" lookup in favor of ACL-style system --- diff --git a/src/src/dkim.c b/src/src/dkim.c index fe536d9ca..68cae73eb 100644 --- a/src/src/dkim.c +++ b/src/src/dkim.c @@ -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:"", + (dkim_signatures->created>0)? + + ); + + dkim_log = string_cat(dkim_log); + + + switch(dkim_signatures->verify_status) { case PDKIM_VERIFY_NONE: debug_printf("not verified\n"); diff --git a/src/src/drtables.c b/src/src/drtables.c index 34431a47f..a384cdbf6 100644 --- a/src/src/drtables.c +++ b/src/src/drtables.c @@ -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 */ { diff --git a/src/src/lookups/Makefile b/src/src/lookups/Makefile index 48d208d02..324e334ea 100644 --- a/src/src/lookups/Makefile +++ b/src/src/lookups/Makefile @@ -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 index 52f2d880f..000000000 --- a/src/src/lookups/dkim.c +++ /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 index 6e07142cf..000000000 --- a/src/src/lookups/dkim.h +++ /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 */