tom 2009/12/15 08:23:15 GMT
Modified files:
exim-src/src dkim.c transport.c
Log:
Improve log output when DKIM signing operation fails.
Revision Changes Path
1.11 +5 -1 exim/exim-src/src/dkim.c
1.26 +3 -1 exim/exim-src/src/transport.c
Index: dkim.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/dkim.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- dkim.c 16 Nov 2009 19:50:36 -0000 1.10
+++ dkim.c 15 Dec 2009 08:23:15 -0000 1.11
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/dkim.c,v 1.10 2009/11/16 19:50:36 nm4 Exp $ */
+/* $Cambridge: exim/exim-src/src/dkim.c,v 1.11 2009/12/15 08:23:15 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -391,6 +391,7 @@
uschar *rc = NULL;
pdkim_signature *signature;
int pdkim_canon;
+ int pdkim_rc;
int sread;
char buf[4096];
int save_errno = 0;
@@ -511,8 +512,11 @@
goto CLEANUP;
}
- if (pdkim_feed_finish(ctx,&signature) != PDKIM_OK)
+ pdkim_rc = pdkim_feed_finish(ctx,&signature);
+ if (pdkim_rc != PDKIM_OK) {
+ log_write(0, LOG_MAIN|LOG_PANIC, "DKIM: signing failed (RC %d)", pdkim_rc);
goto CLEANUP;
+ }
rc = store_get(strlen(signature->signature_header)+3);
Ustrcpy(rc,US signature->signature_header);
Index: transport.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/transport.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- transport.c 16 Nov 2009 19:50:37 -0000 1.25
+++ transport.c 15 Dec 2009 08:23:15 -0000 1.26
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/transport.c,v 1.25 2009/11/16 19:50:37 nm4 Exp $ */
+/* $Cambridge: exim/exim-src/src/transport.c,v 1.26 2009/12/15 08:23:15 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1034,7 +1034,9 @@
if (dkim_strict_result != NULL) {
if ( (strcmpic(dkim_strict,US"1") == 0) ||
(strcmpic(dkim_strict,US"true") == 0) ) {
- save_errno = errno;
+ /* Set errno to something halfway meaningful */
+ save_errno = EACCES;
+ log_write(0, LOG_MAIN, "DKIM: message could not be signed, and dkim_strict is set. Deferring message delivery.");
rc = FALSE;
goto CLEANUP;
}