[exim-cvs] cvs commit: exim/exim-src/src acl.c macros.h veri…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Tom Kistner
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] cvs commit: exim/exim-src/src acl.c macros.h verify.c
tom 2005/07/23 21:46:42 BST

  Modified files:
    exim-src/src         acl.c macros.h verify.c 
  Log:
  Added "success_on_redirect" address verification option


  Revision  Changes    Path
  1.42      +8 -0      exim/exim-src/src/acl.c
  1.17      +1 -0      exim/exim-src/src/macros.h
  1.23      +9 -3      exim/exim-src/src/verify.c


  Index: acl.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/acl.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- acl.c    27 Jun 2005 14:29:43 -0000    1.41
  +++ acl.c    23 Jul 2005 20:46:42 -0000    1.42
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/acl.c,v 1.41 2005/06/27 14:29:43 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/acl.c,v 1.42 2005/07/23 20:46:42 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1338,6 +1338,7 @@
   BOOL defer_ok = FALSE;
   BOOL callout_defer_ok = FALSE;
   BOOL no_details = FALSE;
  +BOOL success_on_redirect = FALSE;
   address_item *sender_vaddr = NULL;
   uschar *verify_sender_address = NULL;
   uschar *pm_mailfrom = NULL;
  @@ -1480,6 +1481,7 @@
     {
     if (strcmpic(ss, US"defer_ok") == 0) defer_ok = TRUE;
     else if (strcmpic(ss, US"no_details") == 0) no_details = TRUE;
  +  else if (strcmpic(ss, US"success_on_redirect") == 0) success_on_redirect = TRUE;


     /* These two old options are left for backwards compatibility */


  @@ -1737,6 +1739,9 @@
         else
           verify_options |= vopt_fake_sender;


  +      if (success_on_redirect)
  +        verify_options |= vopt_success_on_redirect;
  +
         /* The recipient, qualify, and expn options are never set in
         verify_options. */


  @@ -1787,6 +1792,9 @@
   else
     {
     address_item addr2;
  +
  +  if (success_on_redirect)
  +    verify_options |= vopt_success_on_redirect;


     /* We must use a copy of the address for verification, because it might
     get rewritten. */


  Index: macros.h
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/macros.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- macros.h    27 Jun 2005 14:29:04 -0000    1.16
  +++ macros.h    23 Jul 2005 20:46:42 -0000    1.17
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/macros.h,v 1.16 2005/06/27 14:29:04 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/macros.h,v 1.17 2005/07/23 20:46:42 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -617,6 +617,7 @@
   #define vopt_callout_no_cache     0x0040   /* disable callout cache */
   #define vopt_callout_recipsender  0x0080   /* use real sender to verify recip */
   #define vopt_callout_recippmaster 0x0100   /* use postmaster to verify recip */
  +#define vopt_success_on_redirect  0x0200


/* Values for fields in callout cache records */


  Index: verify.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/verify.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- verify.c    27 Jun 2005 14:29:44 -0000    1.22
  +++ verify.c    23 Jul 2005 20:46:42 -0000    1.23
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/verify.c,v 1.22 2005/06/27 14:29:44 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/verify.c,v 1.23 2005/07/23 20:46:42 tom Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -813,6 +813,8 @@
                          rewriting and messages from callouts
                        vopt_qualify => qualify an unqualified address; else error
                        vopt_expn => called from SMTP EXPN command
  +                     vopt_success_on_redirect => when a new address is generated
  +                       the verification instantly succeeds


                        These ones are used by do_callout() -- the options variable
                          is passed to it.
  @@ -850,6 +852,7 @@
   BOOL full_info = (f == NULL)? FALSE : (debug_selector != 0);
   BOOL is_recipient = (options & vopt_is_recipient) != 0;
   BOOL expn         = (options & vopt_expn) != 0;
  +BOOL success_on_redirect = (options & vopt_success_on_redirect) != 0;
   int i;
   int yield = OK;
   int verify_type = expn? v_expn :
  @@ -1219,9 +1222,12 @@
       generated address. */


       if (!full_info &&                    /* Stop if short info wanted AND */
  -         (addr_new == NULL ||            /* No new address OR */
  -          addr_new->next != NULL ||      /* More than one new address OR */
  -          testflag(addr_new, af_pfr)))   /* New address is pfr */
  +         (((addr_new == NULL ||          /* No new address OR */
  +           addr_new->next != NULL ||     /* More than one new address OR */
  +           testflag(addr_new, af_pfr)))  /* New address is pfr */
  +         ||                              /* OR */
  +         (addr_new != NULL &&            /* At least one new address AND */
  +          success_on_redirect)))         /* success_on_redirect is set */
         {
         if (f != NULL) fprintf(f, "%s %s\n", address,
           address_test_mode? "is deliverable" : "verified");