From bc64a74dadcd9d2560b84cad283a52e7346d4140 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Wed, 29 Aug 2007 15:06:47 +0000 Subject: Fix quoting problem with errors_copy. --- test/confs/0256 | 4 ++- test/log/0256 | 9 ++++++- test/mail/0256.abc@def | 31 ++++++++++++++++++++++++ test/mail/0256.abcd | 31 ------------------------ test/mail/0256.abcd+test.ex+ph10 | 31 ++++++++++++++++++++++++ "test/mail/0256.abcd+unknown.domain+\"abc@def\"" | 31 ++++++++++++++++++++++++ test/runtest | 10 ++++---- test/scripts/0000-Basic/0256 | 7 ++++++ test/stdout/0256 | 6 +++++ 9 files changed, 122 insertions(+), 38 deletions(-) create mode 100644 test/mail/0256.abc@def delete mode 100644 test/mail/0256.abcd create mode 100644 test/mail/0256.abcd+test.ex+ph10 create mode 100644 "test/mail/0256.abcd+unknown.domain+\"abc@def\"" create mode 100644 test/stdout/0256 (limited to 'test') diff --git a/test/confs/0256 b/test/confs/0256 index 669fdb114..99faa1d76 100644 --- a/test/confs/0256 +++ b/test/confs/0256 @@ -11,8 +11,10 @@ gecos_name = CALLER_NAME # ----- Main settings ----- +acl_smtp_rcpt = accept qualify_domain = test.ex -errors_copy = *@* abcd@test.ex +errors_copy = *@* ${quote_local_part::abcd+$domain+$local_part}@test.ex +trusted_users = CALLER # ------ Routers ------ diff --git a/test/log/0256 b/test/log/0256 index aaab9b34d..c04aedc55 100644 --- a/test/log/0256 +++ b/test/log/0256 @@ -2,6 +2,13 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 ** unknown@test.ex: Unrouteable address 1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> R=10HmaX-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmaY-0005vi-00 => CALLER R=r1 T=t1 -1999-03-02 09:44:33 10HmaY-0005vi-00 => abcd R=r1 T=t1 +1999-03-02 09:44:33 10HmaY-0005vi-00 => abcd+test.ex+CALLER R=r1 T=t1 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= "abc@def"@unknown.domain U=CALLER P=local-smtp S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 ** unknown@test.ex: Unrouteable address +1999-03-02 09:44:33 10HmbA-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss +1999-03-02 09:44:33 10HmbA-0005vi-00 => abc@def <"abc@def"@unknown.domain> R=r1 T=t1 +1999-03-02 09:44:33 10HmbA-0005vi-00 => abcd+unknown.domain+"abc@def" <"abcd+unknown.domain+\"abc@def\""@test.ex> R=r1 T=t1 +1999-03-02 09:44:33 10HmbA-0005vi-00 Completed +1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed diff --git a/test/mail/0256.abc@def b/test/mail/0256.abc@def new file mode 100644 index 000000000..22a2ecd35 --- /dev/null +++ b/test/mail/0256.abc@def @@ -0,0 +1,31 @@ +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; Tue, 2 Mar 1999 09:44:33 +0000 +X-Failed-Recipients: unknown@test.ex +Auto-Submitted: auto-replied +From: Mail Delivery System +To: "abc@def"@unknown.domain +Subject: Mail delivery failed: returning message to sender +Message-Id: +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: + + unknown@test.ex + Unrouteable address + +------ This is a copy of the message, including all the headers. ------ + +Return-path: <"abc@def"@unknown.domain> +Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz) + (envelope-from <"abc@def"@unknown.domain>) + id 10HmaZ-0005vi-00 + for unknown@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: "abc@def"@unknown.domain +Date: Tue, 2 Mar 1999 09:44:33 +0000 + + diff --git a/test/mail/0256.abcd b/test/mail/0256.abcd deleted file mode 100644 index 87ed8a038..000000000 --- a/test/mail/0256.abcd +++ /dev/null @@ -1,31 +0,0 @@ -From MAILER-DAEMON Tue Mar 02 09:44:33 1999 -Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz) - id 10HmaY-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000 -X-Failed-Recipients: unknown@test.ex -Auto-Submitted: auto-replied -From: Mail Delivery System -To: CALLER@test.ex -Subject: Mail delivery failed: returning message to sender -Message-Id: -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: - - unknown@test.ex - Unrouteable address - ------- This is a copy of the message, including all the headers. ------ - -Return-path: -Received: from CALLER by myhost.test.ex with local (Exim x.yz) - (envelope-from ) - id 10HmaX-0005vi-00 - for unknown@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 -Message-Id: -From: CALLER_NAME -Date: Tue, 2 Mar 1999 09:44:33 +0000 - - diff --git a/test/mail/0256.abcd+test.ex+ph10 b/test/mail/0256.abcd+test.ex+ph10 new file mode 100644 index 000000000..87ed8a038 --- /dev/null +++ b/test/mail/0256.abcd+test.ex+ph10 @@ -0,0 +1,31 @@ +From MAILER-DAEMON Tue Mar 02 09:44:33 1999 +Received: from EXIMUSER by myhost.test.ex with local (Exim x.yz) + id 10HmaY-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000 +X-Failed-Recipients: unknown@test.ex +Auto-Submitted: auto-replied +From: Mail Delivery System +To: CALLER@test.ex +Subject: Mail delivery failed: returning message to sender +Message-Id: +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: + + unknown@test.ex + Unrouteable address + +------ This is a copy of the message, including all the headers. ------ + +Return-path: +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmaX-0005vi-00 + for unknown@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + + diff --git "a/test/mail/0256.abcd+unknown.domain+\"abc@def\"" "b/test/mail/0256.abcd+unknown.domain+\"abc@def\"" new file mode 100644 index 000000000..22a2ecd35 --- /dev/null +++ "b/test/mail/0256.abcd+unknown.domain+\"abc@def\"" @@ -0,0 +1,31 @@ +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; Tue, 2 Mar 1999 09:44:33 +0000 +X-Failed-Recipients: unknown@test.ex +Auto-Submitted: auto-replied +From: Mail Delivery System +To: "abc@def"@unknown.domain +Subject: Mail delivery failed: returning message to sender +Message-Id: +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: + + unknown@test.ex + Unrouteable address + +------ This is a copy of the message, including all the headers. ------ + +Return-path: <"abc@def"@unknown.domain> +Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz) + (envelope-from <"abc@def"@unknown.domain>) + id 10HmaZ-0005vi-00 + for unknown@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: "abc@def"@unknown.domain +Date: Tue, 2 Mar 1999 09:44:33 +0000 + + diff --git a/test/runtest b/test/runtest index 6a4fb2b51..77fe17a13 100755 --- a/test/runtest +++ b/test/runtest @@ -1,6 +1,6 @@ #! /usr/bin/perl -w -# $Cambridge: exim/test/runtest,v 1.28 2007/07/04 10:37:04 ph10 Exp $ +# $Cambridge: exim/test/runtest,v 1.29 2007/08/29 15:06:47 ph10 Exp $ ############################################################################### # This is the controlling script for the "new" test suite for Exim. It should # @@ -23,7 +23,7 @@ use Socket; # Start by initializing some global variables -$testversion = "4.68 (16-Apr-07)"; +$testversion = "4.68 (23-Aug-07)"; $cf = "bin/cf"; $cr = "\r"; @@ -909,7 +909,7 @@ if (! -e $sf) print "\n"; print "------------ $f -----------\n" if (defined $rf && -s $rf && defined $rsf && -s $rsf); - system("$more $f"); + system("$more '$f'"); } } @@ -1023,7 +1023,7 @@ if (-e $sf) # Do the comparison - return 0 if (system("$cf $mf $sf >test-cf") == 0); + return 0 if (system("$cf '$mf' '$sf' >test-cf") == 0); # Handle comparison failure @@ -1043,7 +1043,7 @@ if (-e $sf) # Update or delete the saved file, and give the appropriate return code. if (-s $mf) - { tests_exit(-1, "Failed to cp $mf $sf") if system("cp $mf $sf") != 0; } + { tests_exit(-1, "Failed to cp $mf $sf") if system("cp '$mf' '$sf'") != 0; } else { tests_exit(-1, "Failed to unlink $sf") if !unlink($sf); } diff --git a/test/scripts/0000-Basic/0256 b/test/scripts/0000-Basic/0256 index 0eefe7485..bdab73b33 100644 --- a/test/scripts/0000-Basic/0256 +++ b/test/scripts/0000-Basic/0256 @@ -2,3 +2,10 @@ exim -odi unknown . **** +exim -odi -bs +mail from:<"abc@def"@unknown.domain> +rcpt to: +data +. +quit +**** diff --git a/test/stdout/0256 b/test/stdout/0256 new file mode 100644 index 000000000..0058c5ec2 --- /dev/null +++ b/test/stdout/0256 @@ -0,0 +1,6 @@ +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +354 Enter message, ending with "." on a line by itself +250 OK id=10HmaZ-0005vi-00 +221 myhost.test.ex closing connection -- cgit v1.2.3