-/* $Cambridge: exim/src/src/dkim.c,v 1.10 2009/11/16 19:50:36 nm4 Exp $ */
+/* $Cambridge: exim/src/src/dkim.c,v 1.11 2009/12/15 08:23:15 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
uschar *rc = NULL;
pdkim_signature *signature;
int pdkim_canon;
+ int pdkim_rc;
int sread;
char buf[4096];
int save_errno = 0;
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);
-/* $Cambridge: exim/src/src/transport.c,v 1.25 2009/11/16 19:50:37 nm4 Exp $ */
+/* $Cambridge: exim/src/src/transport.c,v 1.26 2009/12/15 08:23:15 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
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;
}