Rename $interface_address and $interface_port as $received_ip_address
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Mon, 13 Nov 2006 12:07:46 +0000 (12:07 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Mon, 13 Nov 2006 12:07:46 +0000 (12:07 +0000)
and $received_port in an attempt to lessen confusion.

doc/doc-txt/ChangeLog
doc/doc-txt/NewStuff
src/src/expand.c
test/confs/0282
test/confs/0480
test/mail/0282.userx
test/stderr/0480

index ee5817026a4e02f6d2f3377de74bb3fa07b240a5..1ac335408615beb5ca29472cf89fc8050cf86fa7 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.431 2006/11/13 11:56:41 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.432 2006/11/13 12:07:46 ph10 Exp $
 
 Change log file for Exim from version 4.21
 -------------------------------------------
@@ -266,6 +266,11 @@ PH/41 Add bitwise logical operations to eval (courtesy Brad Jorsch).
 
 PH/42 Give an error if -q is specified more than once.
 
+PH/43 Renamed the variables $interface_address and $interface_port as
+      $received_ip_address and $received_port, to make it clear that these
+      values apply to message reception, and not to the outgoing interface when
+      a message is delivered. (The old names remain recognized, of course.)
+
 
 Exim version 4.63
 -----------------
index 53bfcc17910a1f27129dae0ffab8a4161c2e8bbe..564d76df202eae24e419025f74249991962a6758 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/NewStuff,v 1.121 2006/11/13 11:26:37 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/NewStuff,v 1.122 2006/11/13 12:07:46 ph10 Exp $
 
 New Features in Exim
 --------------------
@@ -192,6 +192,11 @@ Version 4.64
       ${eval:~255&0x1234}    yields 4608
       ${eval:-(~255&0x1234)} yields -4608
 
+11. The variables $interface_address and $interface_port have been renamed
+    as $received_ip_address and $received_port, to make it clear that they
+    relate to message reception rather than delivery. (The old names remain
+    available for compatibility.)
+
 
 Version 4.63
 ------------
index 31791a888107f4ee7b254f66b8ecefcc4c70e101..d049466f1897c264783e42068f1eb44388d96270 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/expand.c,v 1.69 2006/11/13 11:26:37 ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.70 2006/11/13 12:07:46 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -436,6 +436,8 @@ static var_entry var_table[] = {
   { "rcpt_fail_count",     vtype_int,         &rcpt_fail_count },
   { "received_count",      vtype_int,         &received_count },
   { "received_for",        vtype_stringptr,   &received_for },
+  { "received_ip_address", vtype_stringptr,   &interface_address },
+  { "received_port",       vtype_int,         &interface_port },
   { "received_protocol",   vtype_stringptr,   &received_protocol },
   { "received_time",       vtype_int,         &received_time },
   { "recipient_data",      vtype_stringptr,   &recipient_data },
index 0952977ab3378503f8fcf5eef9a2baac6f8673ef..9ebe5ad811f68ad886b2c3f525d5c3988494cd0f 100644 (file)
@@ -33,6 +33,7 @@ local_delivery:
   driver = appendfile
   file = DIR/test-mail/$local_part
   user = CALLER
-  headers_add = interface-port: $interface_port
+  headers_add = interface-port: $interface_port\n\
+                received-port:  $received_port
 
 # End
index 3308c0663bff6a39c06337188a8a705745affdf4..c8adb1ba5454d01cf4d957b5c59e762c7933f5ab 100644 (file)
@@ -18,13 +18,13 @@ gecos_name = CALLER_NAME
 
 acl_smtp_rcpt = accept
 
-smtp_active_hostname = ${if eq{$interface_address}{IP1}\
+smtp_active_hostname = ${if eq{$received_ip_address}{IP1}\
                        {host.IP1}\
                        {\
-                       ${if eq{$interface_address}{IP2}\
+                       ${if eq{$received_ip_address}{IP2}\
                          {}\
                          {\
-                         ${if eq{$interface_address}{IP3}\
+                         ${if eq{$received_ip_address}{IP3}\
                            {${lookup{x}lsearch{/non/exist}}}\
                            fail}\
                          }}\
index e01c84b0c1ca18fe4edc793583f885444d62c85c..abd61fa18c93a0448133434d68d4a042815a4a89 100644 (file)
@@ -5,6 +5,7 @@ Received: from [127.0.0.1] (port=1111 helo=rhu.barb)
        id 10HmaX-0005vi-00
        for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
 interface-port: 1225
+received-port:  1225
 
 This is a test message.
 
@@ -15,6 +16,7 @@ Received: from [127.0.0.1] (port=1112 helo=rhu.barb)
        id 10HmaY-0005vi-00
        for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
 interface-port: 1226
+received-port:  1226
 
 This is a test message.
 
index b3f00895fd285b031c952b077296be2f146c0507..507e1d082a7d8c9136300713642cbdbf56ab404b 100644 (file)
@@ -16,7 +16,7 @@
 >>> host in helo_try_verify_hosts? no (option unset)
 >>> host in helo_accept_junk_hosts? no (option unset)
 >>> a.b.c in helo_lookup_domains? no (end of list)
-LOG: failed to expand "${if eq{$interface_address}{V4NET.0.0.1}{host.V4NET.0.0.1}{${if eq{$interface_address}{V4NET.0.0.2}{}{${if eq{$interface_address}{V4NET.0.0.3}{${lookup{x}lsearch{/non/exist}}}fail}}}}}" (smtp_active_hostname): failed to open /non/exist for linear search: No such file or directory
+LOG: failed to expand "${if eq{$received_ip_address}{V4NET.0.0.1}{host.V4NET.0.0.1}{${if eq{$received_ip_address}{V4NET.0.0.2}{}{${if eq{$received_ip_address}{V4NET.0.0.3}{${lookup{x}lsearch{/non/exist}}}fail}}}}}" (smtp_active_hostname): failed to open /non/exist for linear search: No such file or directory
 >>> host in hosts_connection_nolog? no (option unset)
 >>> host in host_lookup? no (option unset)
 >>> host in host_reject_connection? no (option unset)