Test for proper parsing of optional MAIL FROM args.
authorTodd Lyons <tlyons@ivenue.com>
Mon, 4 Jun 2012 13:03:18 +0000 (06:03 -0700)
committerTodd Lyons <tlyons@ivenue.com>
Mon, 4 Jun 2012 13:07:30 +0000 (06:07 -0700)
test/confs/0566 [new file with mode: 0644]
test/log/0566 [new file with mode: 0644]
test/rejectlog/0566 [new file with mode: 0644]
test/scripts/0000-Basic/0566 [new file with mode: 0644]
test/stdout/0566 [new file with mode: 0644]

diff --git a/test/confs/0566 b/test/confs/0566
new file mode 100644 (file)
index 0000000..e7a91c6
--- /dev/null
@@ -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 (file)
index 0000000..e59c733
--- /dev/null
@@ -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@test.ex>: SIZE value too big
+1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@test.ex>: SIZE value too big
diff --git a/test/rejectlog/0566 b/test/rejectlog/0566
new file mode 100644 (file)
index 0000000..67b5dc2
--- /dev/null
@@ -0,0 +1,2 @@
+1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@test.ex>: SIZE value too big
+1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@test.ex>: SIZE value too big
diff --git a/test/scripts/0000-Basic/0566 b/test/scripts/0000-Basic/0566
new file mode 100644 (file)
index 0000000..c4dc0d8
--- /dev/null
@@ -0,0 +1,73 @@
+# Optional MAIL FROM args processing
+#
+# SIZE alone
+exim -bs
+ehlo Testing
+mail from:<x@y> SIZE=1000
+rcpt to:<userx@test.ex>
+quit
+****
+# BODY alone
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=7BIT
+rcpt to:<userx@test.ex>
+quit
+****
+# SIZE then BODY
+exim -bs
+ehlo Testing
+mail from:<x@y> SIZE=1000 BODY=7BIT
+rcpt to:<userx@test.ex>
+quit
+****
+# BODY then SIZE
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=7BIT SIZE=1000
+rcpt to:<userx@test.ex>
+quit
+****
+# AUTH then BODY then SIZE
+exim -bs
+ehlo Testing
+mail from:<x@y> AUTH=x@y BODY=7BIT SIZE=1000
+rcpt to:<userx@test.ex>
+quit
+****
+# BODY then AUTH then SIZE
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=7BIT AUTH=x@y SIZE=1000
+rcpt to:<userx@test.ex>
+quit
+****
+# SIZE then BODY then AUTH
+exim -bs
+ehlo Testing
+mail from:<x@y> SIZE=1000 BODY=7BIT AUTH=x@y
+rcpt to:<userx@test.ex>
+quit
+****
+# SIZE then BODY then SIZE
+exim -bs
+ehlo Testing
+mail from:<x@y> SIZE=1000 BODY=7BIT SIZE=1200
+rcpt to:<userx@test.ex>
+quit
+****
+# (over)SIZE then BODY
+exim -bs
+ehlo Testing
+mail from:<x@y> SIZE=40004 BODY=8BITMIME
+rcpt to:<userx@test.ex>
+quit
+****
+# BODY then (over)SIZE
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=8BITMIME SIZE=40004
+rcpt to:<userx@test.ex>
+quit
+****
+no_msglog_check
diff --git a/test/stdout/0566 b/test/stdout/0566
new file mode 100644 (file)
index 0000000..cb221f6
--- /dev/null
@@ -0,0 +1,90 @@
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+550 SIZE value too big\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+550 SIZE value too big\r
+221 myhost.test.ex closing connection\r