add patch to support dccifd directly from ACL system - thanks to Wolfgang Breyha
[exim.git] / src / src / receive.c
index 651121956b0326f71e57f8b10f9050794cf9f145..88f5eb2a0b2b86a12d07d12d31b9cd59d806fe14 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/receive.c,v 1.41 2007/08/22 14:20:28 ph10 Exp $ */
+/* $Cambridge: exim/src/src/receive.c,v 1.43 2008/01/17 13:03:36 tom Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 
 #include "exim.h"
 
+#if (defined EXPERIMENTAL_DOMAINKEYS) && (defined EXPERIMENTAL_DKIM)
+
+#warning Chaining Domainkeys via DKIM receive functions
+#define RECEIVE_GETC dkim_receive_getc
+#define RECEIVE_UNGETC dkim_receive_ungetc
+
+#else
+
+#if (defined EXPERIMENTAL_DOMAINKEYS) || (defined EXPERIMENTAL_DKIM)
+
 #ifdef EXPERIMENTAL_DOMAINKEYS
+#warning Using Domainkeys receive functions
 #define RECEIVE_GETC dk_receive_getc
 #define RECEIVE_UNGETC dk_receive_ungetc
+#endif
+#ifdef EXPERIMENTAL_DKIM
+#warning Using DKIM receive functions
+#define RECEIVE_GETC dkim_receive_getc
+#define RECEIVE_UNGETC dkim_receive_ungetc
+#endif
+
 #else
+
+/* Normal operation */
 #define RECEIVE_GETC receive_getc
 #define RECEIVE_UNGETC receive_ungetc
+
+#endif
+
+#endif
+
+
+#ifdef EXPERIMENTAL_DCC
+extern int dcc_ok;
 #endif
 
 /*************************************************
@@ -1393,6 +1421,12 @@ message_linecount = body_linecount = body_zerocount =
    inside dk_exim_verify_init(). */
 dk_exim_verify_init();
 #endif
+#ifdef EXPERIMENTAL_DKIM
+/* Call into DKIM to set up the context. Check if DKIM is to be run are carried out
+   inside dk_exim_verify_init(). */
+dkim_exim_verify_init();
+#endif
+
 
 /* Remember the time of reception. Exim uses time+pid for uniqueness of message
 ids, and fractions of a second are required. See the comments that precede the
@@ -2975,6 +3009,9 @@ else
 #ifdef EXPERIMENTAL_DOMAINKEYS
     dk_exim_verify_finish();
 #endif
+#ifdef EXPERIMENTAL_DKIM
+    dkim_exim_verify_finish();
+#endif
 
 #ifdef WITH_CONTENT_SCAN
     if (acl_smtp_mime != NULL &&
@@ -3077,6 +3114,11 @@ else
 unspool_mbox();
 #endif
 
+#ifdef EXPERIMENTAL_DCC
+dcc_ok = 0;
+#endif
+
+
 /* The final check on the message is to run the scan_local() function. The
 version supplied with Exim always accepts, but this is a hook for sysadmins to
 supply their own checking code. The local_scan() function is run even when all