diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/aux-fixed/0536.aliases | 9 | ||||
-rw-r--r-- | test/confs/0536 | 104 | ||||
-rw-r--r-- | test/log/0536 | 41 | ||||
-rw-r--r-- | test/mail/0536.oksender | 32 | ||||
-rw-r--r-- | test/mail/0536.user1 | 27 | ||||
-rw-r--r-- | test/mail/0536.user2 | 27 | ||||
-rw-r--r-- | test/paniclog/0536 | 5 | ||||
-rw-r--r-- | test/rejectlog/0536 | 42 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0536 | 42 | ||||
-rw-r--r-- | test/stderr/0536 | 5 | ||||
-rw-r--r-- | test/stdout/0536 | 40 |
11 files changed, 374 insertions, 0 deletions
diff --git a/test/aux-fixed/0536.aliases b/test/aux-fixed/0536.aliases new file mode 100644 index 000000000..535399bdd --- /dev/null +++ b/test/aux-fixed/0536.aliases @@ -0,0 +1,9 @@ +user20: :fail: No code +user21: :fail: 590 Main code +user22: :fail: 590 5.4.3 Main and extended code +user23: :fail: 490 4.5.6 Wrong code + +user30: :defer: No code +user31: :defer: 490 Main code +user32: :defer: 490 4.4.3 Main and extended code +user33: :defer: 390 3.5.6 Wrong code diff --git a/test/confs/0536 b/test/confs/0536 new file mode 100644 index 000000000..0aa7c5201 --- /dev/null +++ b/test/confs/0536 @@ -0,0 +1,104 @@ +# Exim test configuration 0536 + +FORBID_SMTP_CODE = false + +exim_path = EXIM_PATH +host_lookup_order = bydns +primary_hostname = myhost.test.ex +rfc1413_query_timeout = 0s +spool_directory = DIR/spool +log_file_path = DIR/spool/log/%slog +gecos_pattern = "" +gecos_name = CALLER_NAME + +# ----- Main settings ----- + +acl_smtp_rcpt = rcpt +acl_not_smtp = not_smtp + +trusted_users = CALLER + + +# ----- ACLs ----- + +begin ACL + +rcpt: + deny local_parts = user1 + message = No code + deny local_parts = user2 + message = 599 Main code + deny local_parts = user3 + message = 599 Main code\non two lines + deny local_parts = user4 + message = 599 5.2.3 Main and extended code + deny local_parts = user5 + message = 599 5.12.3 Main and extended code\non two lines + deny local_parts = user6 + message = 299 Wrong code + deny local_parts = user7 + message = 299 Wrong code + log_message = A different log message + + defer local_parts = user8 + message = 499 4.12.343 Main and extended code\non two lines + defer local_parts = user9 + message = 499 4.1234.343 Main and extended code\non two lines + defer local_parts = user10 + message = 399 Wrong code + + deny local_parts = user20 + !verify = recipient + deny local_parts = user21 + !verify = recipient + deny local_parts = user22 + !verify = recipient + deny local_parts = user23 + !verify = recipient + + deny local_parts = user30 + !verify = recipient + deny local_parts = user31 + !verify = recipient + deny local_parts = user32 + !verify = recipient + deny local_parts = user33 + !verify = recipient + + deny message = Should not get this + +not_smtp: + accept senders = : oksender@test.ex + + deny senders = user1@test.ex + message = No code + + deny senders = user2@test.ex + message = 599 Main code + + deny message = Should not get this + +# ----- Routers ----- + +begin routers + +r1: + driver = redirect + allow_fail + allow_defer + data = ${lookup{$local_part}lsearch{DIR/aux-fixed/TESTNUM.aliases}} + forbid_smtp_code = FORBID_SMTP_CODE + +r2: + driver = accept + transport = t1 + +# ----- Transports ----- + +begin transports + +t1: + driver = appendfile + file = DIR/test-mail/$local_part + user = CALLER + diff --git a/test/log/0536 b/test/log/0536 new file mode 100644 index 000000000..ab5fe84c6 --- /dev/null +++ b/test/log/0536 @@ -0,0 +1,41 @@ +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user1@test.ex>: No code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user2@test.ex>: 599 Main code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user3@test.ex>: 599 Main code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user4@test.ex>: 599 5.2.3 Main and extended code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user5@test.ex>: 599 5.12.3 Main and extended code +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 5) in "299 Wrong code" +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user6@test.ex>: 550 Wrong code +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 5) in "299 Wrong code" +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user7@test.ex>: A different log message +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user8@test.ex>: 499 4.12.343 Main and extended code +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user9@test.ex>: 499 4.1234.343 Main and extended code +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 4) in "399 Wrong code" +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user10@test.ex>: 451 Wrong code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user20@test.ex>: No code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user21@test.ex>: 590 Main code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user22@test.ex>: 590 5.4.3 Main and extended code +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 5) in "490 4.5.6 Wrong code" +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user23@test.ex>: 550 Wrong code +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user30@test.ex>: No code +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user31@test.ex>: 490 Main code +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user32@test.ex>: 490 4.4.3 Main and extended code +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 4) in "390 3.5.6 Wrong code" +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user33@test.ex>: 451 Wrong code +1999-03-02 09:44:33 10HmaX-0005vi-00 F=<user1@test.ex> rejected by non-SMTP ACL: No code +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= <> R=10HmaX-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 => user1 <user1@test.ex> R=r2 T=t1 +1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed +1999-03-02 09:44:33 10HmaY-0005vi-00 F=<user2@test.ex> rejected by non-SMTP ACL: 599 Main code +1999-03-02 09:44:33 10HmbA-0005vi-00 <= <> R=10HmaY-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmbA-0005vi-00 => user2 <user2@test.ex> R=r2 T=t1 +1999-03-02 09:44:33 10HmbA-0005vi-00 Completed +1999-03-02 09:44:33 10HmbB-0005vi-00 <= oksender@test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbB-0005vi-00 ** user22@test.ex R=r1: 590 5.4.3 Main and extended code +1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> R=10HmbB-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmbC-0005vi-00 => oksender <oksender@test.ex> R=r2 T=t1 +1999-03-02 09:44:33 10HmbC-0005vi-00 Completed +1999-03-02 09:44:33 10HmbB-0005vi-00 Completed +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user20@test.ex>: No code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user21@test.ex>: Main code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user22@test.ex>: Main and extended code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user23@test.ex>: Wrong code diff --git a/test/mail/0536.oksender b/test/mail/0536.oksender new file mode 100644 index 000000000..9a3e0ea34 --- /dev/null +++ b/test/mail/0536.oksender @@ -0,0 +1,32 @@ +From MAILER-DAEMON Tue Mar 02 09:44:33 1999 +Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz) + id 10HmbC-0005vi-00 + for oksender@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +X-Failed-Recipients: user22@test.ex +Auto-Submitted: auto-replied +From: Mail Delivery System <Mailer-Daemon@myhost.test.ex> +To: oksender@test.ex +Subject: Mail delivery failed: returning message to sender +Message-Id: <E10HmbC-0005vi-00@myhost.test.ex> +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +This message was created automatically by mail delivery software. + +A message that you sent could not be delivered to one or more of its +recipients. This is a permanent error. The following address(es) failed: + + user22@test.ex + 590 5.4.3 Main and extended code + +------ This is a copy of the message, including all the headers. ------ + +Return-path: <oksender@test.ex> +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from <oksender@test.ex>) + id 10HmbB-0005vi-00 + for user22@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: <E10HmbB-0005vi-00@myhost.test.ex> +From: oksender@test.ex +Date: Tue, 2 Mar 1999 09:44:33 +0000 + + diff --git a/test/mail/0536.user1 b/test/mail/0536.user1 new file mode 100644 index 000000000..b918842f9 --- /dev/null +++ b/test/mail/0536.user1 @@ -0,0 +1,27 @@ +From MAILER-DAEMON Tue Mar 02 09:44:33 1999 +Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz) + id 10HmaZ-0005vi-00 + for user1@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Auto-Submitted: auto-replied +From: Mail Delivery System <Mailer-Daemon@myhost.test.ex> +To: user1@test.ex +Subject: Mail failure - rejected by local scanning code +Message-Id: <E10HmaZ-0005vi-00@myhost.test.ex> +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +A message that you sent was rejected by the local scanning code that +checks incoming messages on this system. The following error was given: + + No code + +------ This is a copy of your message, including all the headers. ------ + +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from <user1@test.ex>) + id 10HmaX-0005vi-00 + for user1@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: <E10HmaX-0005vi-00@myhost.test.ex> +From: user1@test.ex +Date: Tue, 2 Mar 1999 09:44:33 +0000 + + diff --git a/test/mail/0536.user2 b/test/mail/0536.user2 new file mode 100644 index 000000000..64bd15814 --- /dev/null +++ b/test/mail/0536.user2 @@ -0,0 +1,27 @@ +From MAILER-DAEMON Tue Mar 02 09:44:33 1999 +Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz) + id 10HmbA-0005vi-00 + for user2@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Auto-Submitted: auto-replied +From: Mail Delivery System <Mailer-Daemon@myhost.test.ex> +To: user2@test.ex +Subject: Mail failure - rejected by local scanning code +Message-Id: <E10HmbA-0005vi-00@myhost.test.ex> +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +A message that you sent was rejected by the local scanning code that +checks incoming messages on this system. The following error was given: + + 599 Main code + +------ This is a copy of your message, including all the headers. ------ + +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from <user2@test.ex>) + id 10HmaY-0005vi-00 + for user1@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: <E10HmaY-0005vi-00@myhost.test.ex> +From: user2@test.ex +Date: Tue, 2 Mar 1999 09:44:33 +0000 + + diff --git a/test/paniclog/0536 b/test/paniclog/0536 new file mode 100644 index 000000000..38a1ee08e --- /dev/null +++ b/test/paniclog/0536 @@ -0,0 +1,5 @@ +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 5) in "299 Wrong code" +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 5) in "299 Wrong code" +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 4) in "399 Wrong code" +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 5) in "490 4.5.6 Wrong code" +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 4) in "390 3.5.6 Wrong code" diff --git a/test/rejectlog/0536 b/test/rejectlog/0536 new file mode 100644 index 000000000..bf06473b6 --- /dev/null +++ b/test/rejectlog/0536 @@ -0,0 +1,42 @@ +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user1@test.ex>: No code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user2@test.ex>: 599 Main code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user3@test.ex>: 599 Main code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user4@test.ex>: 599 5.2.3 Main and extended code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user5@test.ex>: 599 5.12.3 Main and extended code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user6@test.ex>: 550 Wrong code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user7@test.ex>: A different log message +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user8@test.ex>: 499 4.12.343 Main and extended code +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user9@test.ex>: 499 4.1234.343 Main and extended code +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user10@test.ex>: 451 Wrong code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user20@test.ex>: No code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user21@test.ex>: 590 Main code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user22@test.ex>: 590 5.4.3 Main and extended code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user23@test.ex>: 550 Wrong code +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user30@test.ex>: No code +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user31@test.ex>: 490 Main code +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user32@test.ex>: 490 4.4.3 Main and extended code +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT <user33@test.ex>: 451 Wrong code +1999-03-02 09:44:33 10HmaX-0005vi-00 F=<user1@test.ex> rejected by non-SMTP ACL: No code +Envelope-from: <user1@test.ex> +Envelope-to: <user1@myhost.test.ex> +P Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from <user1@test.ex>) + id 10HmaX-0005vi-00 + for user1@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex> +F From: user1@test.ex + Date: Tue, 2 Mar 1999 09:44:33 +0000 +1999-03-02 09:44:33 10HmaY-0005vi-00 F=<user2@test.ex> rejected by non-SMTP ACL: 599 Main code +Envelope-from: <user2@test.ex> +Envelope-to: <user1@myhost.test.ex> +P Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from <user2@test.ex>) + id 10HmaY-0005vi-00 + for user1@myhost.test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +I Message-Id: <E10HmaY-0005vi-00@myhost.test.ex> +F From: user2@test.ex + Date: Tue, 2 Mar 1999 09:44:33 +0000 +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user20@test.ex>: No code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user21@test.ex>: Main code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user22@test.ex>: Main and extended code +1999-03-02 09:44:33 U=CALLER F=<> rejected RCPT <user23@test.ex>: Wrong code diff --git a/test/scripts/0000-Basic/0536 b/test/scripts/0000-Basic/0536 new file mode 100644 index 000000000..30be87619 --- /dev/null +++ b/test/scripts/0000-Basic/0536 @@ -0,0 +1,42 @@ +# Specifying SMTP codes in bespoke error messages +exim -bs +ehlo test.ex +mail from:<> +rcpt to:<user1@test.ex> +rcpt to:<user2@test.ex> +rcpt to:<user3@test.ex> +rcpt to:<user4@test.ex> +rcpt to:<user5@test.ex> +rcpt to:<user6@test.ex> +rcpt to:<user7@test.ex> +rcpt to:<user8@test.ex> +rcpt to:<user9@test.ex> +rcpt to:<user10@test.ex> +rcpt to:<user20@test.ex> +rcpt to:<user21@test.ex> +rcpt to:<user22@test.ex> +rcpt to:<user23@test.ex> +rcpt to:<user30@test.ex> +rcpt to:<user31@test.ex> +rcpt to:<user32@test.ex> +rcpt to:<user33@test.ex> +quit +**** +1 +exim -f user1@test.ex user1 +**** +1 +exim -f user2@test.ex user1 +**** +exim -odi -f oksender@test.ex user22@test.ex +**** +exim -DFORBID_SMTP_CODE=true -bs +ehlo test.ex +mail from:<> +rcpt to:<user20@test.ex> +rcpt to:<user21@test.ex> +rcpt to:<user22@test.ex> +rcpt to:<user23@test.ex> +quit +**** +no_msglog_check diff --git a/test/stderr/0536 b/test/stderr/0536 new file mode 100644 index 000000000..38a1ee08e --- /dev/null +++ b/test/stderr/0536 @@ -0,0 +1,5 @@ +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 5) in "299 Wrong code" +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 5) in "299 Wrong code" +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 4) in "399 Wrong code" +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 5) in "490 4.5.6 Wrong code" +1999-03-02 09:44:33 configured error code starts with incorrect digit (expected 4) in "390 3.5.6 Wrong code" diff --git a/test/stdout/0536 b/test/stdout/0536 new file mode 100644 index 000000000..cc4ce1e60 --- /dev/null +++ b/test/stdout/0536 @@ -0,0 +1,40 @@ +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello CALLER at test.ex
+250-SIZE 52428800
+250-PIPELINING
+250 HELP
+250 OK
+550 No code
+599 Main code
+599-Main code
+599 on two lines
+599 5.2.3 Main and extended code
+599-5.12.3 Main and extended code
+599 5.12.3 on two lines
+550 Wrong code
+550 Wrong code
+499-4.12.343 Main and extended code
+499 4.12.343 on two lines
+499-4.1234.343 Main and extended code
+499 on two lines
+451 Wrong code
+550 No code
+590 Main code
+590 5.4.3 Main and extended code
+550 Wrong code
+451 Temporary local problem - please try later
+490 Temporary local problem - please try later
+490 4.4.3 Temporary local problem - please try later
+451 Temporary local problem - please try later
+221 myhost.test.ex closing connection
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello CALLER at test.ex
+250-SIZE 52428800
+250-PIPELINING
+250 HELP
+250 OK
+550 No code
+550 Main code
+550 Main and extended code
+550 Wrong code
+221 myhost.test.ex closing connection
|