[exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog NewSt…

Góra strony
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Dla: exim-cvs
Temat: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog NewStuff exim/exim-src/src verify.c exim/exim-src/src/routers ipliteral.c exim/exim-test-orig/AutoTest/confs 407 exim/exim-test-orig/AutoTest/s
ph10 2004/11/11 11:40:36 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog NewStuff 
    exim-src/src         verify.c 
    exim-src/src/routers ipliteral.c 
    exim-test-orig/AutoTest/confs 407 
    exim-test-orig/AutoTest/scripts 407 
    exim-test-orig/AutoTest/stdout 407 
  Log:
  (1) $host_address now contains the target address when processing
  ignore_target_hosts; (2) extremely unlikely bug in ipliteral router
  fixed: if ignore_target_hosts called for a host name, it wouldn't have
  worked.


  Revision  Changes    Path
  1.22      +9 -0      exim/exim-doc/doc-txt/ChangeLog
  1.9       +3 -0      exim/exim-doc/doc-txt/NewStuff
  1.2       +1 -1      exim/exim-src/src/routers/ipliteral.c
  1.4       +22 -3     exim/exim-src/src/verify.c
  1.2       +9 -12     exim/exim-test-orig/AutoTest/confs/407
  1.3       +2 -3      exim/exim-test-orig/AutoTest/scripts/407
  1.2       +4 -5      exim/exim-test-orig/AutoTest/stdout/407


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- ChangeLog    10 Nov 2004 15:21:16 -0000    1.21
  +++ ChangeLog    11 Nov 2004 11:40:36 -0000    1.22
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.21 2004/11/10 15:21:16 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.22 2004/11/11 11:40:36 ph10 Exp $


Change log file for Exim from version 4.21
-------------------------------------------
@@ -76,6 +76,15 @@

   21. The rare case of EHLO->STARTTLS->HELO was setting the protocol to "smtp".
       It is now set to "smtps".
  +
  +22. $host_address is now set to the target address during the checking of
  +    ignore_target_hosts.
  +
  +23. When checking ignore_target_hosts for an ipliteral router, no host name was
  +    being passed; this would have caused $sender_host_name to have been used if
  +    matching the list had actually called for a host name (not very likely,
  +    since this list is usually IP addresses). A host name is now passed as
  +    "[x.x.x.x]".



Exim version 4.43

  Index: NewStuff
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/NewStuff,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- NewStuff    10 Nov 2004 10:29:56 -0000    1.8
  +++ NewStuff    11 Nov 2004 11:40:36 -0000    1.9
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.8 2004/11/10 10:29:56 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.9 2004/11/11 11:40:36 ph10 Exp $


   New Features in Exim
   --------------------
  @@ -66,6 +66,9 @@
       for the subprocesses that the daemon creates. Thus, it is useful for
       monitoring the behaviour of the daemon without creating as much output as
       full debugging.
  +
  + 9. $host_address is now set to the target address during the checking of
  +    ignore_target_hosts.





  Index: verify.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/verify.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- verify.c    5 Nov 2004 16:53:28 -0000    1.3
  +++ verify.c    11 Nov 2004 11:40:36 -0000    1.4
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/verify.c,v 1.3 2004/11/05 16:53:28 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/verify.c,v 1.4 2004/11/11 11:40:36 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -2050,7 +2050,9 @@
   verify_check_this_host(uschar **listptr, unsigned int *cache_bits,
     uschar *host_name, uschar *host_address, uschar **valueptr)
   {
  +int rc;
   unsigned int *local_cache_bits = cache_bits;
  +uschar *save_host_address = deliver_host_address;
   check_host_block cb;
   cb.host_name = host_name;
   cb.host_address = host_address;
  @@ -2064,9 +2066,26 @@
   cb.host_ipv4 = (Ustrncmp(host_address, "::ffff:", 7) == 0)?
     host_address + 7 : host_address;


  -return match_check_list(listptr, 0, &hostlist_anchor, &local_cache_bits,
  -  check_host, &cb, MCL_HOST,
  -  (host_address == sender_host_address)? US"host" : host_address, valueptr);
  +/* During the running of the check, put the IP address into $host_address. In 
  +the case of calls from the smtp transport, it will already be there. However, 
  +in other calls (e.g. when testing ignore_target_hosts), it won't. Just to be on 
  +the safe side, any existing setting is preserved, though as I write this
  +(November 2004) I can't see any cases where it is actually needed. */
  +
  +deliver_host_address = host_address;
  +rc = match_check_list(
  +       listptr,                                /* the list */
  +       0,                                      /* separator character */
  +       &hostlist_anchor,                       /* anchor pointer */
  +       &local_cache_bits,                      /* cache pointer */
  +       check_host,                             /* function for testing */
  +       &cb,                                    /* argument for function */
  +       MCL_HOST,                               /* type of check */
  +       (host_address == sender_host_address)? 
  +         US"host" : host_address,              /* text for debugging */
  +       valueptr);                              /* where to pass back data */
  +deliver_host_address = save_host_address;
  +return rc; 
   }




  Index: ipliteral.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/routers/ipliteral.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ipliteral.c    7 Oct 2004 13:10:02 -0000    1.1
  +++ ipliteral.c    11 Nov 2004 11:40:36 -0000    1.2
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/routers/ipliteral.c,v 1.1 2004/10/07 13:10:02 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/routers/ipliteral.c,v 1.2 2004/11/11 11:40:36 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -127,7 +127,7 @@
   /* It seems unlikely that ignore_target_hosts will be used with this router,
   but if it is set, it should probably work. */


  -if (verify_check_this_host(&(rblock->ignore_target_hosts), NULL, NULL,
  +if (verify_check_this_host(&(rblock->ignore_target_hosts), NULL, domain,
         domain + 1, NULL) == OK)
     {
     DEBUG(D_route)


  Index: 407
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/confs/407,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 407    8 Oct 2004 14:49:15 -0000    1.1
  +++ 407    11 Nov 2004 11:40:36 -0000    1.2
  @@ -1,17 +1,15 @@
  -# Exim test configuration 407
  +# Exim test configuration 592


# Macros are set externally in order to get the path
# of the Exim that is being tested, and the directory
# in which the test data lives.

exim_path = EXIM_PATH
+primary_hostname = myhost.test.ex
spool_directory = DIR/spool

# ----- Main settings -----

-domainlist local_domains = test.ex
-
-qualify_domain = test.ex


# ----- Routers -----
@@ -19,18 +17,17 @@
begin routers

r1:
- driver = accept
- transport = t1
+ driver = manualroute
+ ignore_target_hosts = ${if eq{$host_address}{10.12.3.1}{$host_address}{}}
+ route_list = * 1.2.3.4:other2.test.ex
+ transport = t1
+

# ----- Transports -----

begin transports

   t1:
  -  driver = appendfile
  -  user = CALLER
  -  file = DIR/test-mail/$local_part 
  -  transport_filter = /some/path/that/does/not/exist  
  -
  +  driver = smtp    


-# End of Exim 4 configuration
+# End

  Index: 407
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/scripts/407,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- 407    15 Oct 2004 13:38:05 -0000    1.2
  +++ 407    11 Nov 2004 11:40:36 -0000    1.3
  @@ -1,3 +1,2 @@
  -0 SPARE TEST
  -exim -bV
  -****
  +0 $host_address in ignore_target_hosts
  +exim -bt xx@yy


  Index: 407
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/stdout/407,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 407    15 Oct 2004 13:41:57 -0000    1.1
  +++ 407    11 Nov 2004 11:40:36 -0000    1.2
  @@ -1,5 +1,4 @@
  -Exim version x.yz #nn built 07-Mar-2000 12:21:52
  -Copyright (c) University of Cambridge 2004
  -Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql passwd pgsql testdb
  -Fixed never_users: 0
  -Configuration file is /source/exim4/AutoTest/confs/407
  +xx@yy
  +  router = r1, transport = t1
  +  host 1.2.3.4        [1.2.3.4]   
  +  host other2.test.ex [10.12.3.2]