From 1bf43b7812e6dd16ab21c42a28f6ba34a28d2bb7 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Tue, 31 Oct 2006 16:08:11 +0000 Subject: $domain not always set when scanning a domain list. --- test/confs/0544 | 70 +++++++++++++++++++++++++++ test/log/0544 | 3 ++ test/scripts/0000-Basic/0544 | 13 ++++++ test/stderr/0544 | 109 +++++++++++++++++++++++++++++++++++++++++++ test/stdout/0544 | 8 ++++ 5 files changed, 203 insertions(+) create mode 100644 test/confs/0544 create mode 100644 test/log/0544 create mode 100644 test/scripts/0000-Basic/0544 create mode 100644 test/stderr/0544 create mode 100644 test/stdout/0544 (limited to 'test') diff --git a/test/confs/0544 b/test/confs/0544 new file mode 100644 index 000000000..f1a32b31a --- /dev/null +++ b/test/confs/0544 @@ -0,0 +1,70 @@ +# Exim test configuration 0544 + +exim_path = EXIM_PATH +host_lookup_order = bydns +rfc1413_query_timeout = 0s +spool_directory = DIR/spool +log_file_path = DIR/spool/log/%slog +gecos_pattern = "" +gecos_name = CALLER_NAME + +# ----- Main settings ----- + +domainlist dlist = testdb;$domain + +acl_smtp_helo = check_helo +acl_smtp_mail = check_mail +acl_smtp_rcpt = check_rcpt +queue_smtp_domains = testdb;$domain +qualify_domain = test.ex + + +# ----- ACLs ----- + +begin acl + +check_helo: + warn + condition = ${if match_domain {$sender_helo_name}{+dlist}} + accept + + +check_mail: + warn hosts = domain=$domain/sender_domain=$sender_address_domain + accept + +check_rcpt: + warn domains = domain=$domain/sender_domain=$sender_address_domain + warn sender_domains = domain=$domain/sender_domain=$sender_address_domain + accept + + +# ----- Routers ----- + +begin routers + +smarthost: + driver = accept + transport = smtp + + +# ----- Transports ----- + +begin transports + +smtp: + driver = smtp + hosts = 127.0.0.1 + allow_localhost + port = PORT_S + + +# ----- Retry ----- + + +begin retry + +* * F,5d,15m + + +# End diff --git a/test/log/0544 b/test/log/0544 new file mode 100644 index 000000000..9d519bb84 --- /dev/null +++ b/test/log/0544 @@ -0,0 +1,3 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@domain1.ex R=smarthost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set +1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@domain2.ex R=smarthost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set diff --git a/test/scripts/0000-Basic/0544 b/test/scripts/0000-Basic/0544 new file mode 100644 index 000000000..e886cfd99 --- /dev/null +++ b/test/scripts/0000-Basic/0544 @@ -0,0 +1,13 @@ +# $domain setting in domain list matching +need_ipv4 +# +exim -odi -d-all+expand userx@domain1.ex userx@domain2.ex +**** +# Check of $domain and $sender_domain at RCPT time +exim -bs -d-all+expand +ehlo ehlo.domain +mail from: +rcpt to: +quit +**** +no_msglog_check diff --git a/test/stderr/0544 b/test/stderr/0544 new file mode 100644 index 000000000..2d49eabcb --- /dev/null +++ b/test/stderr/0544 @@ -0,0 +1,109 @@ +Exim version x.yz .... +configuration file is TESTSUITE/test-config +admin user +expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +condition: def:sender_rcvhost + result: false +expanding: from $sender_rcvhost + + result: from + +skipping: result is not used +condition: def:sender_ident + result: true +expanding: $sender_ident + result: CALLER +expanding: from ${quote_local_part:$sender_ident} + result: from CALLER +condition: def:sender_helo_name + result: false +expanding: (helo=$sender_helo_name) + + result: (helo=) + +skipping: result is not used +expanding: ${if def:sender_ident {from ${quote_local_part:$sender_ident} }}${if def:sender_helo_name {(helo=$sender_helo_name) + }} + result: from CALLER +condition: def:received_protocol + result: true +expanding: with $received_protocol + result: with local +condition: def:sender_address + result: true +expanding: (envelope-from <$sender_address>) + + result: (envelope-from ) + +condition: def:received_for + result: false +expanding: + for $received_for + result: + for +skipping: result is not used +expanding: ${tod_full} + result: Tue, 2 Mar 1999 09:44:33 +0000 +LOG: MAIN + <= CALLER@test.ex U=CALLER P=local S=sss +created log directory TESTSUITE/spool/log +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +expanding: testdb;$domain + result: testdb;domain1.ex +LOG: MAIN + == userx@domain1.ex R=smarthost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set +LOG: MAIN + == userx@domain2.ex R=smarthost T=smtp defer (-1): domain matches queue_smtp_domains, or -odqs set +expanding: $h_list-id:$h_list-post:$h_list-subscribe: + result: +expanding: + result: +expanding: $h_precedence: + result: +expanding: (?i)bulk|list|junk + result: (?i)bulk|list|junk +expanding: $h_auto-submitted: + result: +expanding: (?i)auto-generated|auto-replied + result: (?i)auto-generated|auto-replied +condition: or {{ !eq{$h_list-id:$h_list-post:$h_list-subscribe:}{} }{ match{$h_precedence:}{(?i)bulk|list|junk} }{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} + result: false +expanding: no + result: no +skipping: result is not used +expanding: yes + result: yes +expanding: ${if or {{ !eq{$h_list-id:$h_list-post:$h_list-subscribe:}{} }{ match{$h_precedence:}{(?i)bulk|list|junk} }{ match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}} + result: yes +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +admin user +LOG: smtp_connection MAIN + SMTP connection from CALLER +expanding: $smtp_active_hostname ESMTP Exim $version_number $tod_full + result: the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +expanding: $sender_helo_name + result: ehlo.domain +expanding: +dlist + result: +dlist +expanding: testdb;$domain + result: testdb;ehlo.domain +condition: match_domain {$sender_helo_name}{+dlist} + result: true +expanding: ${if match_domain {$sender_helo_name}{+dlist}} + result: true +expanding: domain=$domain/sender_domain=$sender_address_domain + result: domain=/sender_domain=sender.domain +expanding: domain=$domain/sender_domain=$sender_address_domain + result: domain=recipient.domain/sender_domain=sender.domain +expanding: domain=$domain/sender_domain=$sender_address_domain + result: domain=recipient.domain/sender_domain=sender.domain +LOG: smtp_connection MAIN + SMTP connection from CALLER closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stdout/0544 b/test/stdout/0544 new file mode 100644 index 000000000..9d9fa56e1 --- /dev/null +++ b/test/stdout/0544 @@ -0,0 +1,8 @@ +220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250-the.local.host.name Hello CALLER at ehlo.domain +250-SIZE 52428800 +250-PIPELINING +250 HELP +250 OK +250 Accepted +221 the.local.host.name closing connection -- cgit v1.2.3