Disable widen_domains when verifying senders, unless rewrite_headers is
[exim.git] / src / src / routers / ipliteral.c
index fa41cc41152cbab6c5a2cf26a3d2352858f359a1..ac99fd9899ba11cdc683bd45f7138a25bc1bdece 100644 (file)
@@ -1,10 +1,10 @@
-/* $Cambridge: exim/src/src/routers/ipliteral.c,v 1.1 2004/10/07 13:10:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/ipliteral.c,v 1.5 2005/09/12 15:09:55 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2004 */
+/* Copyright (c) University of Cambridge 1995 - 2005 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -90,7 +90,7 @@ ipliteral_router_entry(
   router_instance *rblock,        /* data for this instantiation */
   address_item *addr,             /* address we are working on */
   struct passwd *pw,              /* passwd entry after check_local_user */
-  BOOL verify,                    /* TRUE when verifying */
+  int verify,                     /* v_none/v_recipient/v_sender/v_expn */
   address_item **addr_local,      /* add it to this if it's local */
   address_item **addr_remote,     /* add it to this if it's remote */
   address_item **addr_new,        /* put new addresses on here */
@@ -118,7 +118,7 @@ host name to "(unnamed)". */
 if (domain[0] != '[' || domain[len-1] != ']') return DECLINE;
 domain[len-1] = 0;  /* temporarily */
 
-if (!string_is_ip_address(domain+1, NULL))
+if (string_is_ip_address(domain+1, NULL) == 0)
   {
   domain[len-1] = ']';
   return DECLINE;
@@ -127,7 +127,7 @@ if (!string_is_ip_address(domain+1, NULL))
 /* 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)