diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/src/globals.c | 3 | ||||
-rw-r--r-- | src/src/macros.h | 16 | ||||
-rw-r--r-- | src/src/smtp_in.c | 18 |
3 files changed, 21 insertions, 16 deletions
diff --git a/src/src/globals.c b/src/src/globals.c index 11470fbe4..4031fa2d3 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/globals.c,v 1.48 2006/02/13 12:02:59 ph10 Exp $ */ +/* $Cambridge: exim/src/src/globals.c,v 1.49 2006/02/14 14:55:37 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -677,6 +677,7 @@ bit_table log_options[] = { { US"retry_defer", L_retry_defer }, { US"return_path_on_delivery", LX_return_path_on_delivery }, { US"sender_on_delivery", LX_sender_on_delivery }, + { US"sender_verify_fail", LX_sender_verify_fail }, { US"size_reject", L_size_reject }, { US"skip_delivery", L_skip_delivery }, { US"smtp_confirmation", LX_smtp_confirmation }, diff --git a/src/src/macros.h b/src/src/macros.h index 1deab7ad8..497589023 100644 --- a/src/src/macros.h +++ b/src/src/macros.h @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/macros.h,v 1.22 2006/02/07 11:19:00 ph10 Exp $ */ +/* $Cambridge: exim/src/src/macros.h,v 1.23 2006/02/14 14:55:37 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -381,12 +381,13 @@ set all the bits in a multi-word selector. */ #define LX_rejected_header 0x80001000 #define LX_return_path_on_delivery 0x80002000 #define LX_sender_on_delivery 0x80004000 -#define LX_smtp_confirmation 0x80008000 -#define LX_subject 0x80010000 -#define LX_tls_certificate_verified 0x80020000 -#define LX_tls_cipher 0x80040000 -#define LX_tls_peerdn 0x80080000 -#define LX_unknown_in_list 0x80100000 +#define LX_sender_verify_fail 0x80008000 +#define LX_smtp_confirmation 0x80010000 +#define LX_subject 0x80020000 +#define LX_tls_certificate_verified 0x80040000 +#define LX_tls_cipher 0x80080000 +#define LX_tls_peerdn 0x80100000 +#define LX_unknown_in_list 0x80200000 #define L_default (L_connection_reject | \ L_delay_delivery | \ @@ -401,6 +402,7 @@ set all the bits in a multi-word selector. */ #define LX_default ((LX_acl_warn_skipped | \ LX_rejected_header | \ + LX_sender_verify_fail | \ LX_tls_cipher) & 0x7fffffff) /* Private error numbers for delivery failures, set negative so as not diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index a6a14fe2f..4ed335c02 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/smtp_in.c,v 1.32 2006/02/13 16:23:57 ph10 Exp $ */ +/* $Cambridge: exim/src/src/smtp_in.c,v 1.33 2006/02/14 14:55:37 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1845,19 +1845,21 @@ if (where == ACL_WHERE_RCPT || where == ACL_WHERE_DATA || where == ACL_WHERE_MIM /* If there's been a sender verification failure with a specific message, and we have not sent a response about it yet, do so now, as a preliminary line for -failures, but not defers. However, log it in both cases. */ +failures, but not defers. However, always log it for defer, and log it for fail +unless the sender_verify_fail log selector has been turned off. */ if (sender_verified_failed != NULL && !testflag(sender_verified_failed, af_sverify_told)) { setflag(sender_verified_failed, af_sverify_told); - log_write(0, LOG_MAIN|LOG_REJECT, "%s sender verify %s for <%s>%s", - host_and_ident(TRUE), - ((sender_verified_failed->special_action & 255) == DEFER)? "defer" : "fail", - sender_verified_failed->address, - (sender_verified_failed->message == NULL)? US"" : - string_sprintf(": %s", sender_verified_failed->message)); + if (rc != FAIL || (log_extra_selector & LX_sender_verify_fail) != 0) + log_write(0, LOG_MAIN|LOG_REJECT, "%s sender verify %s for <%s>%s", + host_and_ident(TRUE), + ((sender_verified_failed->special_action & 255) == DEFER)? "defer":"fail", + sender_verified_failed->address, + (sender_verified_failed->message == NULL)? US"" : + string_sprintf(": %s", sender_verified_failed->message)); if (rc == FAIL && sender_verified_failed->user_message != NULL) smtp_respond(code, FALSE, string_sprintf( |