differ only in their names.
.new
-The value for a match will be the primary host name/
+The value for a match will be the primary host name.
.wen
only if that IP address is recognized as local for email routing purposes. The
&%local_interfaces%& and &%extra_local_interfaces%& options can be used to
control which of a host's several IP addresses are treated as local.
-In today's Internet, the use of domain literals is controversial.
+In today's Internet, the use of domain literals is controversial;
+see the &%allow_domain_literals%& main option.
.new
The value for a match will be the &`@[]`& string.
expand_nlength[expand_setup] = slen - patlen;
expand_nmax = expand_setup;
}
- if (valueptr) *valueptr = pattern; /* "value" gets the pattern */
+ if (valueptr) *valueptr = pattern - 1; /* "value" gets the (original) pattern */
return OK;
}
--- /dev/null
+# Exim test configuration 0624
+
+.include DIR/aux-var/std_conf_prefix
+
+
+# ----- Main settings -----
+
+primary_hostname = primaryhostname.ex
+hosts_treat_as_local = 46.test.ex
+allow_domain_literals
+
+acl_smtp_rcpt = chk_rcpt
+
+# ----- ACL -----
+
+begin acl
+
+chk_rcpt:
+ accept domains = OPT
+ logwrite = domain $domain
+ logwrite = value $domain_data
+
+# End
--- /dev/null
+1999-03-02 09:44:33 U=CALLER F=<testclient@primaryhostname.ex> rejected RCPT <a@notmatched.ex>
+1999-03-02 09:44:33 domain plainstring.ex
+1999-03-02 09:44:33 value plainstring.ex
+1999-03-02 09:44:33 domain headtail.ex
+1999-03-02 09:44:33 value *tail.ex
+1999-03-02 09:44:33 domain headregextail.ex
+1999-03-02 09:44:33 value ^.*regex
+1999-03-02 09:44:33 domain primaryhostname.ex
+1999-03-02 09:44:33 value primaryhostname.ex
+1999-03-02 09:44:33 domain [127.0.0.1]
+1999-03-02 09:44:33 value @[]
+1999-03-02 09:44:33 domain mx46.test.ex
+1999-03-02 09:44:33 value @mx_any/ignore=1.1.1.1
--- /dev/null
+1999-03-02 09:44:33 U=CALLER F=<testclient@primaryhostname.ex> rejected RCPT <a@notmatched.ex>
--- /dev/null
+# domainlist match values
+#
+exim -bs -DOPT=:
+HELO test
+MAIL FROM:<testclient>
+RCPT TO:<a@notmatched.ex>
+QUIT
+****
+#
+exim -bs '-DOPT=notthis : plainstring.ex : nothiseither'
+HELO test
+MAIL FROM:<testclient>
+RCPT TO:<a@plainstring.ex>
+QUIT
+****
+#
+exim -bs '-DOPT=notthis : *tail.ex : nothiseither'
+HELO test
+MAIL FROM:<testclient>
+RCPT TO:<a@headtail.ex>
+QUIT
+****
+#
+exim -bs '-DOPT=notthis : ^.*regex : nothiseither'
+HELO test
+MAIL FROM:<testclient>
+RCPT TO:<a@headregextail.ex>
+QUIT
+****
+#
+exim -bs '-DOPT=notthis : @ : nothiseither'
+HELO test
+MAIL FROM:<testclient>
+RCPT TO:<a@primaryhostname.ex>
+QUIT
+****
+#
+#
+exim -bs '-DOPT=notthis : @[] : nothiseither'
+HELO test
+MAIL FROM:<testclient>
+RCPT TO:<a@[127.0.0.1]>
+QUIT
+****
+#
+# malformed
+exim -bs '-DOPT=notthis : @[] : nothiseither'
+HELO test
+MAIL FROM:<testclient>
+RCPT TO:<a@127.0.0.1]>
+QUIT
+****
+#
+# malformed
+exim -bs '-DOPT=notthis : @[] : nothiseither'
+HELO test
+MAIL FROM:<testclient>
+RCPT TO:<a@[127.0.0.1>
+QUIT
+****
+#
+#
+exim -bs '-DOPT=notthis : @mx_any/ignore=1.1.1.1 : nothiseither'
+HELO test
+MAIL FROM:<testclient>
+RCPT TO:<a@mx46.test.ex>
+QUIT
+****
+#
local_part=x domain=x.test.ex
checking domains
x.test.ex in "*.test.ex"? yes (matched "*.test.ex")
-data from lookup saved for cache for +local_domains: key 'x.test.ex' value '.test.ex'
+data from lookup saved for cache for +local_domains: key 'x.test.ex' value '*.test.ex'
x.test.ex in "+local_domains"? yes (matched "+local_domains")
calling r2 router
r2 router called for x@x.test.ex
queued for t2 transport: local_part = x
domain = x.test.ex
errors_to=NULL
- domain_data=.test.ex localpart_data=NULL
+ domain_data=*.test.ex localpart_data=NULL
routed by r2 router
envelope to: x@x.test.ex
transport: t2
queued for null transport: local_part = postmaster
domain = test.ex
errors_to=NULL
- domain_data=NULL localpart_data=NULL
+ domain_data=NULL localpart_data=postmaster
routed by pm router
envelope to: postmaster@test.ex
transport: null
--- /dev/null
+220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 primaryhostname.ex Hello CALLER at test\r
+250 OK\r
+550 Administrative prohibition\r
+221 primaryhostname.ex closing connection\r
+220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 primaryhostname.ex Hello CALLER at test\r
+250 OK\r
+250 Accepted\r
+221 primaryhostname.ex closing connection\r
+220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 primaryhostname.ex Hello CALLER at test\r
+250 OK\r
+250 Accepted\r
+221 primaryhostname.ex closing connection\r
+220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 primaryhostname.ex Hello CALLER at test\r
+250 OK\r
+250 Accepted\r
+221 primaryhostname.ex closing connection\r
+220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 primaryhostname.ex Hello CALLER at test\r
+250 OK\r
+250 Accepted\r
+221 primaryhostname.ex closing connection\r
+220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 primaryhostname.ex Hello CALLER at test\r
+250 OK\r
+250 Accepted\r
+221 primaryhostname.ex closing connection\r
+220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 primaryhostname.ex Hello CALLER at test\r
+250 OK\r
+501 <a@127.0.0.1]>: malformed address: ]> may not follow <a@127.0.0.1\r
+221 primaryhostname.ex closing connection\r
+220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 primaryhostname.ex Hello CALLER at test\r
+250 OK\r
+501 <a@[127.0.0.1>: malformed domain literal\r
+221 primaryhostname.ex closing connection\r
+220 primaryhostname.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 primaryhostname.ex Hello CALLER at test\r
+250 OK\r
+250 Accepted\r
+221 primaryhostname.ex closing connection\r