summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-05-30 22:20:33 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-05-30 23:16:57 +0100
commit1a6230a33e235e2b008caabd112f8bc6cb1bcc60 (patch)
tree2236023f70b3be0daf0ffa658bdc365e5b7eec1e
parent5739711991a412084e89905e2ebaf396ab8fb6b1 (diff)
downloadexim4-1a6230a33e235e2b008caabd112f8bc6cb1bcc60.tar.gz
Avoid writing msglog files in -bh and -bhc modes. Bug 1804
-rw-r--r--doc/doc-txt/ChangeLog2
-rw-r--r--src/src/exim.c1
-rw-r--r--test/confs/04202
-rw-r--r--test/confs/057519
-rw-r--r--test/log/04205
-rw-r--r--test/msglog/0420.10HmaX-0005vi-002
-rw-r--r--test/msglog/0420.10HmaY-0005vi-002
-rw-r--r--test/scripts/0000-Basic/042019
-rw-r--r--test/scripts/0000-Basic/057510
-rw-r--r--test/stderr/042082
-rw-r--r--test/stderr/057560
-rw-r--r--test/stdout/042057
-rw-r--r--test/stdout/057514
13 files changed, 170 insertions, 105 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index eca1defa8..254070e26 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -35,6 +35,8 @@ JH/07 Retire gnutls_require_mac et.al. These were nonfunctional since 4.80
JH/08 Bug 1836: Fix crash in VRFY handling when handed an unqualified name
(lacking @domain). Apply the same qualification processing as RCPT.
+JH/09 Bug 1804: Avoid writing msglog files when in -bh or -bhc mode.
+
Exim version 4.87
-----------------
diff --git a/src/src/exim.c b/src/src/exim.c
index d462c3e84..474851c21 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -2059,6 +2059,7 @@ for (i = 1; i < argc; i++)
sender_host_address = argv[i];
host_checking = checking = log_testing_mode = TRUE;
host_checking_callout = argrest[1] == 'c';
+ message_logs = FALSE;
}
/* -bi: This option is used by sendmail to initialize *the* alias file,
diff --git a/test/confs/0420 b/test/confs/0420
index 242b00855..204e86e3c 100644
--- a/test/confs/0420
+++ b/test/confs/0420
@@ -14,7 +14,9 @@ tls_advertise_hosts =
primary_hostname = mail.test.ex
qualify_domain = test.ex
+queue_only
acl_smtp_rcpt = accept
+acl_smtp_data = accept logwrite = h: <$h_Received:>
received_header_text = ${if eq{$sender_address}{x@y}{}{Received: some text}}
diff --git a/test/confs/0575 b/test/confs/0575
new file mode 100644
index 000000000..d629e818d
--- /dev/null
+++ b/test/confs/0575
@@ -0,0 +1,19 @@
+# Exim test configuration 0575
+
+exim_path = EXIM_PATH
+keep_environment =
+host_lookup_order = bydns
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+tls_advertise_hosts =
+
+# ----- Main settings -----
+
+primary_hostname = mail.test.ex
+qualify_domain = test.ex
+
+acl_smtp_rcpt = accept
+
+# End
diff --git a/test/log/0420 b/test/log/0420
new file mode 100644
index 000000000..fc68727c1
--- /dev/null
+++ b/test/log/0420
@@ -0,0 +1,5 @@
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmaX-0005vi-00 h: <>
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= x@y H=(client.test.ex) [127.0.0.1] P=smtp S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 h: <some text; Tue, 2 Mar 1999 09:44:33 +0000>
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= a@b H=(client.test.ex) [127.0.0.1] P=smtp S=sss
diff --git a/test/msglog/0420.10HmaX-0005vi-00 b/test/msglog/0420.10HmaX-0005vi-00
index b14f9b1e9..518070603 100644
--- a/test/msglog/0420.10HmaX-0005vi-00
+++ b/test/msglog/0420.10HmaX-0005vi-00
@@ -1 +1 @@
-1999-03-02 09:44:33 Received from x@y H=[V4NET.0.0.0] P=smtp S=sss
+1999-03-02 09:44:33 Received from x@y H=(client.test.ex) [127.0.0.1] P=smtp S=sss
diff --git a/test/msglog/0420.10HmaY-0005vi-00 b/test/msglog/0420.10HmaY-0005vi-00
index 6c25e0e5d..532c7a67a 100644
--- a/test/msglog/0420.10HmaY-0005vi-00
+++ b/test/msglog/0420.10HmaY-0005vi-00
@@ -1 +1 @@
-1999-03-02 09:44:33 Received from a@b H=[V4NET.0.0.0] P=smtp S=sss
+1999-03-02 09:44:33 Received from a@b H=(client.test.ex) [127.0.0.1] P=smtp S=sss
diff --git a/test/scripts/0000-Basic/0420 b/test/scripts/0000-Basic/0420
index c61a23d1e..2f7fe4998 100644
--- a/test/scripts/0000-Basic/0420
+++ b/test/scripts/0000-Basic/0420
@@ -1,14 +1,31 @@
# received_header_text
-exim -d -bh V4NET.0.0.0
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+client 127.0.0.1 PORT_D
+??? 220
+helo client.test.ex
+??? 250
mail from:<x@y>
+??? 250
rcpt to:<x@y>
+??? 250
data
+??? 354
Message.
.
+??? 250
mail from:<a@b>
+??? 250
rcpt to:<x@y>
+??? 250
data
+??? 354
Message.
.
+??? 250
quit
+??? 221
****
+#
+killdaemon
diff --git a/test/scripts/0000-Basic/0575 b/test/scripts/0000-Basic/0575
new file mode 100644
index 000000000..e4534af9b
--- /dev/null
+++ b/test/scripts/0000-Basic/0575
@@ -0,0 +1,10 @@
+# -bh and msglog
+# no logfiles, says the docs
+exim -d -bh V4NET.0.0.0
+mail from:<x@y>
+rcpt to:<x@y>
+data
+Message.
+.
+quit
+****
diff --git a/test/stderr/0420 b/test/stderr/0420
index 1bf978723..045fadc9b 100644
--- a/test/stderr/0420
+++ b/test/stderr/0420
@@ -1,82 +1,2 @@
-Exim version x.yz ....
-changed uid/gid: forcing real = effective
- uid=uuuu gid=CALLER_GID pid=pppp
-configuration file is TESTSUITE/test-config
-admin user
-changed uid/gid: privilege not needed
- uid=EXIM_UID gid=EXIM_GID pid=pppp
-originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
-sender address = CALLER@test.ex
-sender_fullhost = [V4NET.0.0.0]
-sender_rcvhost = [V4NET.0.0.0]
-host in hosts_connection_nolog? no (option unset)
-LOG: smtp_connection MAIN
- SMTP connection from [V4NET.0.0.0]
-host in host_lookup? no (option unset)
-set_process_info: pppp handling incoming connection from [V4NET.0.0.0]
-host in host_reject_connection? no (option unset)
-host in sender_unqualified_hosts? no (option unset)
-host in recipient_unqualified_hosts? no (option unset)
-host in helo_verify_hosts? no (option unset)
-host in helo_try_verify_hosts? no (option unset)
-host in helo_accept_junk_hosts? no (option unset)
-SMTP>> 220 mail.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
-smtp_setup_msg entered
-SMTP<< mail from:<x@y>
-SMTP>> 250 OK
-SMTP<< rcpt to:<x@y>
-processing "accept"
-accept: condition test succeeded in inline ACL
-end of inline ACL: ACCEPT
-SMTP>> 250 Accepted
-DSN: orcpt: NULL flags: 0
-SMTP<< data
-SMTP>> 354 Enter message, ending with "." on a line by itself
-search_tidyup called
-host in ignore_fromline_hosts? no (option unset)
->>Headers received:
-search_tidyup called
->>Headers after rewriting and local additions:
-
-Data file written for message 10HmaX-0005vi-00
->>Generated Received: header line
-* Received: ; Tue, 2 Mar 1999 09:44:33 +0000
-calling local_scan(); timeout=300
-local_scan() returned 0 NULL
-LOG: MAIN
- <= x@y H=[V4NET.0.0.0] P=smtp S=sss
-SMTP>> 250 OK id=10HmaX-0005vi-00
-smtp_setup_msg entered
-SMTP<< mail from:<a@b>
-SMTP>> 250 OK
-SMTP<< rcpt to:<x@y>
-processing "accept"
-accept: condition test succeeded in inline ACL
-end of inline ACL: ACCEPT
-SMTP>> 250 Accepted
-DSN: orcpt: NULL flags: 0
-SMTP<< data
-SMTP>> 354 Enter message, ending with "." on a line by itself
-search_tidyup called
-host in ignore_fromline_hosts? no (option unset)
->>Headers received:
-
-search_tidyup called
->>Headers after rewriting and local additions:
-
-Data file written for message 10HmaY-0005vi-00
->>Generated Received: header line
-P Received: some text; Tue, 2 Mar 1999 09:44:33 +0000
-calling local_scan(); timeout=300
-local_scan() returned 0 NULL
-LOG: MAIN
- <= a@b H=[V4NET.0.0.0] P=smtp S=sss
-SMTP>> 250 OK id=10HmaY-0005vi-00
-smtp_setup_msg entered
-SMTP<< quit
-SMTP>> 221 mail.test.ex closing connection
-LOG: smtp_connection MAIN
- SMTP connection from [V4NET.0.0.0] closed by QUIT
-search_tidyup called
->>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>>
+******** SERVER ********
diff --git a/test/stderr/0575 b/test/stderr/0575
new file mode 100644
index 000000000..4c1a4c099
--- /dev/null
+++ b/test/stderr/0575
@@ -0,0 +1,60 @@
+Exim version x.yz ....
+changed uid/gid: forcing real = effective
+ uid=uuuu gid=CALLER_GID pid=pppp
+configuration file is TESTSUITE/test-config
+admin user
+changed uid/gid: privilege not needed
+ uid=EXIM_UID gid=EXIM_GID pid=pppp
+originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
+sender address = CALLER@test.ex
+sender_fullhost = [V4NET.0.0.0]
+sender_rcvhost = [V4NET.0.0.0]
+host in hosts_connection_nolog? no (option unset)
+LOG: smtp_connection MAIN
+ SMTP connection from [V4NET.0.0.0]
+host in host_lookup? no (option unset)
+set_process_info: pppp handling incoming connection from [V4NET.0.0.0]
+host in host_reject_connection? no (option unset)
+host in sender_unqualified_hosts? no (option unset)
+host in recipient_unqualified_hosts? no (option unset)
+host in helo_verify_hosts? no (option unset)
+host in helo_try_verify_hosts? no (option unset)
+host in helo_accept_junk_hosts? no (option unset)
+SMTP>> 220 mail.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+smtp_setup_msg entered
+SMTP<< mail from:<x@y>
+SMTP>> 250 OK
+SMTP<< rcpt to:<x@y>
+processing "accept"
+accept: condition test succeeded in inline ACL
+end of inline ACL: ACCEPT
+SMTP>> 250 Accepted
+DSN: orcpt: NULL flags: 0
+SMTP<< data
+SMTP>> 354 Enter message, ending with "." on a line by itself
+search_tidyup called
+host in ignore_fromline_hosts? no (option unset)
+>>Headers received:
+
+search_tidyup called
+>>Headers after rewriting and local additions:
+
+Data file written for message 10HmaX-0005vi-00
+>>Generated Received: header line
+P Received: from [V4NET.0.0.0]
+ by mail.test.ex with smtp (Exim x.yz)
+ (envelope-from <x@y>)
+ id 10HmaX-0005vi-00
+ for x@y; Tue, 2 Mar 1999 09:44:33 +0000
+calling local_scan(); timeout=300
+local_scan() returned 0 NULL
+LOG: MAIN
+ <= x@y H=[V4NET.0.0.0] P=smtp S=sss
+SMTP>> 250 OK id=10HmaX-0005vi-00
+smtp_setup_msg entered
+SMTP<< quit
+SMTP>> 221 mail.test.ex closing connection
+LOG: smtp_connection MAIN
+ SMTP connection from [V4NET.0.0.0] closed by QUIT
+search_tidyup called
+>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>>
diff --git a/test/stdout/0420 b/test/stdout/0420
index 56c57b692..1d78c1d2d 100644
--- a/test/stdout/0420
+++ b/test/stdout/0420
@@ -1,21 +1,36 @@
-
-**** SMTP testing session as if from host V4NET.0.0.0
-**** but without any ident (RFC 1413) callback.
-**** This is not for real!
-
-220 mail.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
-250 OK
-250 Accepted
-354 Enter message, ending with "." on a line by itself
-250 OK id=10HmaX-0005vi-00
-
-**** SMTP testing: that is not a real message id!
-
-250 OK
-250 Accepted
-354 Enter message, ending with "." on a line by itself
-250 OK id=10HmaY-0005vi-00
-
-**** SMTP testing: that is not a real message id!
-
-221 mail.test.ex closing connection
+Connecting to 127.0.0.1 port 1225 ... connected
+??? 220
+<<< 220 mail.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> helo client.test.ex
+??? 250
+<<< 250 mail.test.ex Hello client.test.ex [127.0.0.1]
+>>> mail from:<x@y>
+??? 250
+<<< 250 OK
+>>> rcpt to:<x@y>
+??? 250
+<<< 250 Accepted
+>>> data
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Message.
+>>> .
+??? 250
+<<< 250 OK id=10HmaX-0005vi-00
+>>> mail from:<a@b>
+??? 250
+<<< 250 OK
+>>> rcpt to:<x@y>
+??? 250
+<<< 250 Accepted
+>>> data
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Message.
+>>> .
+??? 250
+<<< 250 OK id=10HmaY-0005vi-00
+>>> quit
+??? 221
+<<< 221 mail.test.ex closing connection
+End of script
diff --git a/test/stdout/0575 b/test/stdout/0575
new file mode 100644
index 000000000..d7ad1f324
--- /dev/null
+++ b/test/stdout/0575
@@ -0,0 +1,14 @@
+
+**** SMTP testing session as if from host V4NET.0.0.0
+**** but without any ident (RFC 1413) callback.
+**** This is not for real!
+
+220 mail.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmaX-0005vi-00
+
+**** SMTP testing: that is not a real message id!
+
+221 mail.test.ex closing connection