From: Todd Lyons Date: Mon, 4 Jun 2012 13:03:18 +0000 (-0700) Subject: Test for proper parsing of optional MAIL FROM args. X-Git-Tag: exim-4_81_RC1~83 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2668ed87c9346d474341ec4ee654f0bab9a2e68f;p=exim.git Test for proper parsing of optional MAIL FROM args. --- diff --git a/test/confs/0566 b/test/confs/0566 new file mode 100644 index 000000000..e7a91c694 --- /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 000000000..e59c7336d --- /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= rejected RCPT : SIZE value too big +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : SIZE value too big diff --git a/test/rejectlog/0566 b/test/rejectlog/0566 new file mode 100644 index 000000000..67b5dc277 --- /dev/null +++ b/test/rejectlog/0566 @@ -0,0 +1,2 @@ +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : SIZE value too big +1999-03-02 09:44:33 U=CALLER F= rejected RCPT : SIZE value too big diff --git a/test/scripts/0000-Basic/0566 b/test/scripts/0000-Basic/0566 new file mode 100644 index 000000000..c4dc0d8aa --- /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: SIZE=1000 +rcpt to: +quit +**** +# BODY alone +exim -bs +ehlo Testing +mail from: BODY=7BIT +rcpt to: +quit +**** +# SIZE then BODY +exim -bs +ehlo Testing +mail from: SIZE=1000 BODY=7BIT +rcpt to: +quit +**** +# BODY then SIZE +exim -bs +ehlo Testing +mail from: BODY=7BIT SIZE=1000 +rcpt to: +quit +**** +# AUTH then BODY then SIZE +exim -bs +ehlo Testing +mail from: AUTH=x@y BODY=7BIT SIZE=1000 +rcpt to: +quit +**** +# BODY then AUTH then SIZE +exim -bs +ehlo Testing +mail from: BODY=7BIT AUTH=x@y SIZE=1000 +rcpt to: +quit +**** +# SIZE then BODY then AUTH +exim -bs +ehlo Testing +mail from: SIZE=1000 BODY=7BIT AUTH=x@y +rcpt to: +quit +**** +# SIZE then BODY then SIZE +exim -bs +ehlo Testing +mail from: SIZE=1000 BODY=7BIT SIZE=1200 +rcpt to: +quit +**** +# (over)SIZE then BODY +exim -bs +ehlo Testing +mail from: SIZE=40004 BODY=8BITMIME +rcpt to: +quit +**** +# BODY then (over)SIZE +exim -bs +ehlo Testing +mail from: BODY=8BITMIME SIZE=40004 +rcpt to: +quit +**** +no_msglog_check diff --git a/test/stdout/0566 b/test/stdout/0566 new file mode 100644 index 000000000..cb221f611 --- /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