ph10 2006/02/14 14:55:38 GMT
Modified files:
exim-doc/doc-txt ChangeLog NewStuff
exim-src/src globals.c macros.h smtp_in.c
exim-test/confs 0462
exim-test/log 0462
exim-test/rejectlog 0462
exim-test/scripts/0000-Basic 0462
exim-test/stderr 0462
exim-test/stdout 0462
Log:
Add log selector sender_verify_fail.
Revision Changes Path
1.299 +2 -0 exim/exim-doc/doc-txt/ChangeLog
1.85 +6 -0 exim/exim-doc/doc-txt/NewStuff
1.49 +1 -0 exim/exim-src/src/globals.c
1.23 +8 -6 exim/exim-src/src/macros.h
1.33 +9 -7 exim/exim-src/src/smtp_in.c
1.2 +3 -0 exim/exim-test/confs/0462
1.2 +1 -0 exim/exim-test/log/0462
1.2 +1 -0 exim/exim-test/rejectlog/0462
1.2 +17 -0 exim/exim-test/scripts/0000-Basic/0462
1.2 +31 -0 exim/exim-test/stderr/0462
1.2 +20 -0 exim/exim-test/stdout/0462
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.298
retrieving revision 1.299
diff -u -r1.298 -r1.299
--- ChangeLog 14 Feb 2006 14:26:14 -0000 1.298
+++ ChangeLog 14 Feb 2006 14:55:37 -0000 1.299
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.298 2006/02/14 14:26:14 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.299 2006/02/14 14:55:37 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -159,6 +159,8 @@
results in an empty string is now treated as unset.
PH/30 Fix eximon buffer overflow bug (Bugzilla #73).
+
+PH/31 Added sender_verify_fail logging option.
Exim version 4.60
Index: NewStuff
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/NewStuff,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- NewStuff 14 Feb 2006 14:12:06 -0000 1.84
+++ NewStuff 14 Feb 2006 14:55:37 -0000 1.85
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.84 2006/02/14 14:12:06 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.85 2006/02/14 14:55:37 ph10 Exp $
New Features in Exim
--------------------
@@ -48,6 +48,12 @@
PH/06 In both GnuTLS and OpenSSL, an expansion of tls_privatekey that results
in an empty string is now treated as unset.
+
+PH/07 There is a new log selector called sender_verify_fail, which is set by
+ default. If it is unset, the separate log line that gives details of a
+ sender verification failure is not written. Log lines for the rejection
+ of SMTP commands (e.g. RCPT) contain just "sender verify failed", so some
+ detail is lost.
Version 4.60
Index: globals.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/globals.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- globals.c 13 Feb 2006 12:02:59 -0000 1.48
+++ globals.c 14 Feb 2006 14:55:37 -0000 1.49
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/globals.c,v 1.48 2006/02/13 12:02:59 ph10 Exp $ */
+/* $Cambridge: exim/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 @@
{ 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 },
Index: macros.h
===================================================================
RCS file: /home/cvs/exim/exim-src/src/macros.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- macros.h 7 Feb 2006 11:19:00 -0000 1.22
+++ macros.h 14 Feb 2006 14:55:37 -0000 1.23
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/macros.h,v 1.22 2006/02/07 11:19:00 ph10 Exp $ */
+/* $Cambridge: exim/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 @@
#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 @@
#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
Index: smtp_in.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/smtp_in.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- smtp_in.c 13 Feb 2006 16:23:57 -0000 1.32
+++ smtp_in.c 14 Feb 2006 14:55:37 -0000 1.33
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/smtp_in.c,v 1.32 2006/02/13 16:23:57 ph10 Exp $ */
+/* $Cambridge: exim/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 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(
Index: 0462
===================================================================
RCS file: /home/cvs/exim/exim-test/confs/0462,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 0462 7 Feb 2006 10:34:26 -0000 1.1
+++ 0462 14 Feb 2006 14:55:37 -0000 1.2
@@ -1,5 +1,7 @@
# Exim test configuration 0462
+SELECTOR=
+
exim_path = EXIM_PATH
host_lookup_order = bydns
primary_hostname = myhost.test.ex
@@ -15,6 +17,7 @@
acl_smtp_rcpt = $local_part
smtp_return_error_details
+log_selector = SELECTOR
# ----- ACL -----
Index: 0462
===================================================================
RCS file: /home/cvs/exim/exim-test/log/0462,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 0462 7 Feb 2006 10:34:46 -0000 1.1
+++ 0462 14 Feb 2006 14:55:37 -0000 1.2
@@ -2,3 +2,4 @@
1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<Ok@localhost> rejected RCPT <checkpm@???>: Sender verify failed
1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <NOTok@elsewhere>: response to "RCPT TO:<NOTok@elsewhere>" from 127.0.0.1 [127.0.0.1] was: 550 NO
1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<NOTok@elsewhere> rejected RCPT <nocheckpm@???>: Sender verify failed
+1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<NOTok2@elsewhere> rejected RCPT <nocheckpm@???>: Sender verify failed
Index: 0462
===================================================================
RCS file: /home/cvs/exim/exim-test/rejectlog/0462,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 0462 7 Feb 2006 10:47:29 -0000 1.1
+++ 0462 14 Feb 2006 14:55:37 -0000 1.2
@@ -2,3 +2,4 @@
1999-03-02 09:44:33 H=[V4NET.0.0.1] U=root F=<Ok@localhost> rejected RCPT <checkpm@???>: Sender verify failed
1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root sender verify fail for <NOTok@elsewhere>: response to "RCPT TO:<NOTok@elsewhere>" from 127.0.0.1 [127.0.0.1] was: 550 NO
1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<NOTok@elsewhere> rejected RCPT <nocheckpm@???>: Sender verify failed
+1999-03-02 09:44:33 H=[V4NET.0.0.2] U=root F=<NOTok2@elsewhere> rejected RCPT <nocheckpm@???>: Sender verify failed
Index: 0462
===================================================================
RCS file: /home/cvs/exim/exim-test/scripts/0000-Basic/0462,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 0462 7 Feb 2006 10:54:33 -0000 1.1
+++ 0462 14 Feb 2006 14:55:37 -0000 1.2
@@ -41,3 +41,20 @@
RCPT TO:<nocheckpm@???>
QUIT
****
+# Same again, but with sender_verify_fail logging turned off
+server PORT_S
+220 Server ready
+HELO
+250 OK
+MAIL FROM
+250 OK
+RCPT TO
+550 NO
+QUIT
+250 OK
+****
+sudo exim -DSELECTOR=-sender_verify_fail -d-all+verify -v -bs -oMa V4NET.0.0.2
+MAIL FROM:<NOTok2@elsewhere>
+RCPT TO:<nocheckpm@???>
+QUIT
+****
Index: 0462
===================================================================
RCS file: /home/cvs/exim/exim-test/stderr/0462,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 0462 7 Feb 2006 10:47:31 -0000 1.1
+++ 0462 14 Feb 2006 14:55:38 -0000 1.2
@@ -79,3 +79,34 @@
LOG: smtp_connection MAIN
SMTP connection from root closed by QUIT
>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>>
+Exim version x.yz ....
+configuration file is TESTSUITE/test-config
+trusted user
+admin user
+LOG: smtp_connection MAIN
+ SMTP connection from root
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+Verifying NOTok2@elsewhere
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+Considering NOTok2@elsewhere
+Attempting full verification using callout
+callout cache: found domain record
+callout cache: no address record found
+interface=NULL port=1224
+Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected
+ SMTP<< 220 Server ready
+ SMTP>> HELO myhost.test.ex
+ SMTP<< 250 OK
+ SMTP>> MAIL FROM:<>
+ SMTP<< 250 OK
+ SMTP>> RCPT TO:<NOTok2@elsewhere>
+ SMTP<< 550 NO
+ SMTP>> QUIT
+wrote callout cache domain record:
+ result=1 postmaster=0 random=0
+wrote negative callout cache address record
+LOG: MAIN REJECT
+ H=[V4NET.0.0.2] U=root F=<NOTok2@elsewhere> rejected RCPT <nocheckpm@???>: Sender verify failed
+LOG: smtp_connection MAIN
+ SMTP connection from root closed by QUIT
+>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>>
Index: 0462
===================================================================
RCS file: /home/cvs/exim/exim-test/stdout/0462,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 0462 7 Feb 2006 10:47:37 -0000 1.1
+++ 0462 14 Feb 2006 14:55:38 -0000 1.2
@@ -18,6 +18,14 @@
550-Response: 550 NO
550 Sender verify failed
221 myhost.test.ex closing connection
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 OK
+550-Verification failed for <NOTok2@elsewhere>
+550-Called: 127.0.0.1
+550-Sent: RCPT TO:<NOTok2@elsewhere>
+550-Response: 550 NO
+550 Sender verify failed
+221 myhost.test.ex closing connection
******** SERVER ********
Listening on port 1224 ...
@@ -46,6 +54,18 @@
MAIL FROM:<>
250 OK
RCPT TO:<NOTok@elsewhere>
+550 NO
+QUIT
+250 OK
+End of script
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+220 Server ready
+HELO myhost.test.ex
+250 OK
+MAIL FROM:<>
+250 OK
+RCPT TO:<NOTok2@elsewhere>
550 NO
QUIT
250 OK