diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2015-11-03 14:40:56 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2015-11-03 14:41:15 +0000 |
commit | 858e91c21a3a14da760299b6d54676ac18526418 (patch) | |
tree | 245fc169929e56d9a3d3130606524b09d4fb3323 /test | |
parent | 27d9366447c75ae8c2263ac49f6bd7327ed15ebe (diff) |
PRDR: Introduce $prdr_requested flag variable. Bug 1712
Diffstat (limited to 'test')
-rw-r--r-- | test/confs/5500 | 10 | ||||
-rw-r--r-- | test/log/5500 | 9 | ||||
-rw-r--r-- | test/mail/5500.userx | 8 | ||||
-rw-r--r-- | test/scripts/5500-PRDR/5500 | 34 | ||||
-rw-r--r-- | test/stdout/5500 | 33 |
5 files changed, 83 insertions, 11 deletions
diff --git a/test/confs/5500 b/test/confs/5500 index 6b9e328ba..bbdd696f9 100644 --- a/test/confs/5500 +++ b/test/confs/5500 @@ -22,6 +22,7 @@ trusted_users = CALLER prdr_enable = true +acl_smtp_mail = mail_acl acl_smtp_rcpt = accept acl_smtp_data_prdr = prdr_acl acl_smtp_data = data_acl @@ -30,6 +31,9 @@ acl_smtp_data = data_acl begin acl +mail_acl: + accept logwrite = prdr_requested: <$prdr_requested> + prdr_acl: defer local_parts = usery deny local_parts = userz @@ -56,10 +60,4 @@ r0: driver = accept transport = t1 -# ----- Retry ----- - -begin retry - -* * F,5d,5m - # End diff --git a/test/log/5500 b/test/log/5500 index ef5372cd1..997a32e31 100644 --- a/test/log/5500 +++ b/test/log/5500 @@ -1,17 +1,26 @@ 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 prdr_requested: <yes> 1999-03-02 09:44:33 10HmaY-0005vi-00 PRDR R=<userx@test.ex> acceptance 1999-03-02 09:44:33 10HmaY-0005vi-00 PRDR R=<usery@test.ex> temporary refusal 1999-03-02 09:44:33 10HmaY-0005vi-00 PRDR R=<userz@test.ex> refusal 1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> H=(rhu.barb) [127.0.0.1] P=esmtp PRDR S=sss 1999-03-02 09:44:33 10HmaY-0005vi-00 => userx <userx@test.ex> R=r0 T=t1 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed +1999-03-02 09:44:33 prdr_requested: <yes> 1999-03-02 09:44:33 10HmaX-0005vi-00 PRDR R=<userp@test.ex> acceptance 1999-03-02 09:44:33 10HmaX-0005vi-00 PRDR R=<userq@test.ex> acceptance 1999-03-02 09:44:33 10HmaX-0005vi-00 H=(rhu.barb) [127.0.0.1] F=<> rejected after DATA +1999-03-02 09:44:33 prdr_requested: <yes> 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= <> H=(rhu.barb) [127.0.0.1] P=esmtp S=sss 1999-03-02 09:44:33 10HmaZ-0005vi-00 => user1 <user1@test.ex> R=r0 T=t1 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed +1999-03-02 09:44:33 prdr_requested: <yes> 1999-03-02 09:44:33 10HmbA-0005vi-00 PRDR R=<usery@test.ex> temporary refusal 1999-03-02 09:44:33 10HmbA-0005vi-00 PRDR R=<usery@test.ex> temporary refusal +1999-03-02 09:44:33 prdr_requested: <yes> 1999-03-02 09:44:33 10HmbB-0005vi-00 PRDR R=<userz@test.ex> refusal 1999-03-02 09:44:33 10HmbB-0005vi-00 PRDR R=<userz@test.ex> refusal +1999-03-02 09:44:33 prdr_requested: <no> +1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> H=(rhu.barb) [127.0.0.1] P=esmtp S=sss +1999-03-02 09:44:33 10HmbC-0005vi-00 => userx <userx@test.ex> R=r0 T=t1 +1999-03-02 09:44:33 10HmbC-0005vi-00 Completed diff --git a/test/mail/5500.userx b/test/mail/5500.userx index c46897f8d..59fd89bba 100644 --- a/test/mail/5500.userx +++ b/test/mail/5500.userx @@ -5,3 +5,11 @@ Received: from [127.0.0.1] (helo=rhu.barb) Sender: sender@some.where +From MAILER-DAEMON Tue Mar 02 09:44:33 1999 +Received: from [127.0.0.1] (helo=rhu.barb) + by myhost.test.ex with esmtp (Exim x.yz) + id 10HmbC-0005vi-00 + for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Sender: sender@some.where + + diff --git a/test/scripts/5500-PRDR/5500 b/test/scripts/5500-PRDR/5500 index 567b00085..1c6c344fe 100644 --- a/test/scripts/5500-PRDR/5500 +++ b/test/scripts/5500-PRDR/5500 @@ -35,7 +35,7 @@ Sender: sender@some.where quit ??? 221 **** -sleep 1 +millisleep 500 # # # 2: traditional data acl should be called, resulting in an overall reject @@ -65,7 +65,7 @@ Sender: sender@some.where quit ??? 221 **** -sleep 1 +millisleep 500 # # # 3: PRDR should be avoided for a single-recipient message @@ -91,7 +91,7 @@ Sender: sender@some.where quit ??? 221 **** -sleep 1 +millisleep 500 # # 4: double temp-reject client 127.0.0.1 PORT_D @@ -120,7 +120,7 @@ Sender: sender@some.where quit ??? 221 **** -sleep 1 +millisleep 500 # # 5: double reject client 127.0.0.1 PORT_D @@ -149,7 +149,31 @@ Sender: sender@some.where quit ??? 221 **** -sleep 1 +millisleep 500 +# +# 6: no PRDR request +client 127.0.0.1 PORT_D +??? 220 +ehlo rhu.barb +??? 250- +??? 250- +??? 250- +??? 250- +??? 250-PRDR +??? 250 +mail from:<> +??? 250 +rcpt to:<userx@test.ex> +??? 250 +data +??? 354 +Sender: sender@some.where +. +??? 250 +quit +??? 221 +**** +millisleep 500 # killdaemon # diff --git a/test/stdout/5500 b/test/stdout/5500 index d5efef741..37294c24b 100644 --- a/test/stdout/5500 +++ b/test/stdout/5500 @@ -204,3 +204,36 @@ Connecting to 127.0.0.1 port 1225 ... connected ??? 221 <<< 221 myhost.test.ex closing connection End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> ehlo rhu.barb +??? 250- +<<< 250-myhost.test.ex Hello rhu.barb [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250-PRDR +<<< 250-PRDR +??? 250 +<<< 250 HELP +>>> mail from:<> +??? 250 +<<< 250 OK +>>> rcpt to:<userx@test.ex> +??? 250 +<<< 250 Accepted +>>> data +??? 354 +<<< 354 Enter message, ending with "." on a line by itself +>>> Sender: sender@some.where +>>> . +??? 250 +<<< 250 OK id=10HmbC-0005vi-00 +>>> quit +??? 221 +<<< 221 myhost.test.ex closing connection +End of script |