[exim-cvs] Test for proper parsing of optional MAIL FROM arg…

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Test for proper parsing of optional MAIL FROM args.
Gitweb: http://git.exim.org/exim.git/commitdiff/2668ed87c9346d474341ec4ee654f0bab9a2e68f
Commit:     2668ed87c9346d474341ec4ee654f0bab9a2e68f
Parent:     d27f98fe90545fc2e794afc0b3b2494dccc65183
Author:     Todd Lyons <tlyons@???>
AuthorDate: Mon Jun 4 06:03:18 2012 -0700
Committer:  Todd Lyons <tlyons@???>
CommitDate: Mon Jun 4 06:07:30 2012 -0700


    Test for proper parsing of optional MAIL FROM args.
---
 test/confs/0566              |   65 ++++++++++++++++++++++++++++++
 test/log/0566                |    5 ++
 test/rejectlog/0566          |    2 +
 test/scripts/0000-Basic/0566 |   73 ++++++++++++++++++++++++++++++++++
 test/stdout/0566             |   90 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 235 insertions(+), 0 deletions(-)


diff --git a/test/confs/0566 b/test/confs/0566
new file mode 100644
index 0000000..e7a91c6
--- /dev/null
+++ b/test/confs/0566
@@ -0,0 +1,65 @@
+# Exim test configuration 0028
+
+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 -----
+
+domainlist local_domains = test.ex
+
+acl_smtp_rcpt = acl_rcpt
+acl_smtp_data = acl_data
+
+
+# ------ ACLs ------
+
+begin acl
+
+acl_rcpt:
+  accept endpass
+         message = SIZE value too big
+         condition = ${if > {$message_size}{10000}{no}{yes}}
+
+acl_data:
+  accept endpass
+         message = message too big - \$recipients=$recipients ($recipients_count)
+         condition = ${if > {$message_size}{10000}{no}{yes}}
+
+
+# ------ Routers ------
+
+begin routers
+
+r1:
+  driver = dnslookup
+  domains = ! +local_domains
+  transport = dev_null
+  no_more
+
+r2:
+  driver = accept
+  local_parts = userx : postmaster
+  transport = local_delivery
+
+
+# ------ Transports ------
+
+begin transports
+
+dev_null:
+  driver = appendfile
+  file = /dev/null
+  user = CALLER
+
+local_delivery:
+  driver = appendfile
+  file = DIR/test-mail/$local_part
+  user = CALLER
+
+# End
diff --git a/test/log/0566 b/test/log/0566
new file mode 100644
index 0000000..e59c733
--- /dev/null
+++ b/test/log/0566
@@ -0,0 +1,5 @@
+1999-03-02 09:44:33 ignoring AUTH=x@y from U=CALLER (client not authenticated)
+1999-03-02 09:44:33 ignoring AUTH=x@y from U=CALLER (client not authenticated)
+1999-03-02 09:44:33 ignoring AUTH=x@y from U=CALLER (client not authenticated)
+1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@???>: SIZE value too big
+1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@???>: SIZE value too big
diff --git a/test/rejectlog/0566 b/test/rejectlog/0566
new file mode 100644
index 0000000..67b5dc2
--- /dev/null
+++ b/test/rejectlog/0566
@@ -0,0 +1,2 @@
+1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@???>: SIZE value too big
+1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@???>: SIZE value too big
diff --git a/test/scripts/0000-Basic/0566 b/test/scripts/0000-Basic/0566
new file mode 100644
index 0000000..c4dc0d8
--- /dev/null
+++ b/test/scripts/0000-Basic/0566
@@ -0,0 +1,73 @@
+# Optional MAIL FROM args processing
+#
+# SIZE alone
+exim -bs
+ehlo Testing
+mail from:<x@y> SIZE=1000
+rcpt to:<userx@???>
+quit
+****
+# BODY alone
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=7BIT
+rcpt to:<userx@???>
+quit
+****
+# SIZE then BODY
+exim -bs
+ehlo Testing
+mail from:<x@y> SIZE=1000 BODY=7BIT
+rcpt to:<userx@???>
+quit
+****
+# BODY then SIZE
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=7BIT SIZE=1000
+rcpt to:<userx@???>
+quit
+****
+# AUTH then BODY then SIZE
+exim -bs
+ehlo Testing
+mail from:<x@y> AUTH=x@y BODY=7BIT SIZE=1000
+rcpt to:<userx@???>
+quit
+****
+# BODY then AUTH then SIZE
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=7BIT AUTH=x@y SIZE=1000
+rcpt to:<userx@???>
+quit
+****
+# SIZE then BODY then AUTH
+exim -bs
+ehlo Testing
+mail from:<x@y> SIZE=1000 BODY=7BIT AUTH=x@y
+rcpt to:<userx@???>
+quit
+****
+# SIZE then BODY then SIZE
+exim -bs
+ehlo Testing
+mail from:<x@y> SIZE=1000 BODY=7BIT SIZE=1200
+rcpt to:<userx@???>
+quit
+****
+# (over)SIZE then BODY
+exim -bs
+ehlo Testing
+mail from:<x@y> SIZE=40004 BODY=8BITMIME
+rcpt to:<userx@???>
+quit
+****
+# BODY then (over)SIZE
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=8BITMIME SIZE=40004
+rcpt to:<userx@???>
+quit
+****
+no_msglog_check
diff --git a/test/stdout/0566 b/test/stdout/0566
new file mode 100644
index 0000000..cb221f6
--- /dev/null
+++ b/test/stdout/0566
@@ -0,0 +1,90 @@
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello CALLER at Testing
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+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 Testing
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+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 Testing
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+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 Testing
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+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 Testing
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+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 Testing
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+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 Testing
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+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 Testing
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+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 Testing
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+550 SIZE value too big
+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 Testing
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+550 SIZE value too big
+221 myhost.test.ex closing connection