Update copyright year in (most) files (those that my script finds).
[exim.git] / src / src / routers / queryprogram.c
index f97c70755faaa74ad9d28dde0b565f42d1535259..c9b409e78238f7994c911e25b30ad1afa2d0527b 100644 (file)
@@ -1,10 +1,10 @@
-/* $Cambridge: exim/src/src/routers/queryprogram.c,v 1.1 2004/10/07 13:10:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/queryprogram.c,v 1.7 2006/02/07 11:19:02 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2004 */
+/* Copyright (c) University of Cambridge 1995 - 2006 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 #include "../exim.h"
@@ -181,7 +181,7 @@ queryprogram_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 */
@@ -278,7 +278,7 @@ if (pid < 0)
 
 /* Nothing is written to the standard input. */
 
-close(fd_in);
+(void)close(fd_in);
 
 /* Wait for the process to finish, applying the timeout, and inspect its return
 code. */
@@ -310,7 +310,7 @@ if ((rc = child_close(pid, ob->timeout)) != 0)
 /* Read the pipe to get the command's output, and then close it. */
 
 len = read(fd_out, buffer, sizeof(buffer) - 1);
-close(fd_out);
+(void)close(fd_out);
 
 /* Failure to return any data is an error. */
 
@@ -356,6 +356,8 @@ if (strcmpic(rword, US"REDIRECT") == 0)
       RDO_REWRITE,               /* rewrite generated addresses */
     NULL,                        /* :include: directory not relevant */
     NULL,                        /* sieve vacation directory not relevant */
+    NULL,                        /* sieve useraddress not relevant */
+    NULL,                        /* sieve subaddress not relevant */
     &ugid,                       /* uid/gid (but not set) */
     &generated,                  /* where to hang the results */
     &(addr->message),            /* where to put messages */
@@ -414,7 +416,11 @@ if (strcmpic(rword, US"accept") != 0)
   if (strcmpic(rword, US"decline") == 0) return DECLINE;
   if (strcmpic(rword, US"pass") == 0) return PASS;
   addr->message = string_copy(rdata);                /* data is a message */
-  if (strcmpic(rword, US"fail") == 0) return FAIL;
+  if (strcmpic(rword, US"fail") == 0)
+    {
+    setflag(addr, af_pass_message);
+    return FAIL;
+    }
   if (strcmpic(rword, US"freeze") == 0) addr->special_action = SPECIAL_FREEZE;
   else if (strcmpic(rword, US"defer") != 0)
     {