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

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: exim-cvs
Assumpte: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src deliver.c filter.c structs.h
ph10 2005/12/19 12:25:21 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         deliver.c filter.c structs.h 
  Log:
  Another bug in autoreply with bad address.


  Revision  Changes    Path
  1.280     +8 -0      exim/exim-doc/doc-txt/ChangeLog
  1.25      +16 -2     exim/exim-src/src/deliver.c
  1.8       +8 -3      exim/exim-src/src/filter.c
  1.8       +1 -0      exim/exim-src/src/structs.h


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.279
  retrieving revision 1.280
  diff -u -r1.279 -r1.280
  --- ChangeLog    15 Dec 2005 18:09:55 -0000    1.279
  +++ ChangeLog    19 Dec 2005 12:25:21 -0000    1.280
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.279 2005/12/15 18:09:55 jetmore Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.280 2005/12/19 12:25:21 ph10 Exp $


Change log file for Exim from version 4.21
-------------------------------------------
@@ -51,6 +51,14 @@

   JJ/02 exipick: Added support for new ACL variable spool format introduced
         in 4.61-PH/06
  +
  +PH/10 Fixed another bug related to PH/04 above: if an incoming message had a
  +      syntactically invalid From: or Reply-to: line, and a filter used this to
  +      generate an autoreply, and therefore failed to obtain an address for the
  +      autoreply, Exim could try to deliver to a non-existent relative file
  +      name, causing unrelated and misleading errors. What now happens is that
  +      it logs this as a hard delivery error, but does not attempt to create a
  +      bounce message.



Exim version 4.60

  Index: deliver.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/deliver.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- deliver.c    12 Dec 2005 11:41:50 -0000    1.24
  +++ deliver.c    19 Dec 2005 12:25:21 -0000    1.25
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/deliver.c,v 1.24 2005/12/12 11:41:50 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/deliver.c,v 1.25 2005/12/19 12:25:21 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -5175,7 +5175,20 @@


       if (testflag(addr, af_pfr))
         {
  -      int offset = testflag(addr->parent, af_homonym)? 3:0;
  +      /* If an autoreply in a filter could not generate a syntactically valid
  +      address, give up forthwith. Set af_ignore_error so that we don't try to
  +      generate a bounce. */
  +
  +      if (testflag(addr, af_bad_reply))
  +        {
  +        addr->basic_errno = ERRNO_BADADDRESS2;
  +        addr->local_part = addr->address;
  +        addr->message =
  +          US"filter autoreply generated syntactically invalid recipient";
  +        setflag(addr, af_ignore_error);
  +        (void)post_process_one(addr, FAIL, LOG_MAIN, DTYPE_ROUTER, 0);
  +        continue;   /* with the next new address */
  +        }


         /* If two different users specify delivery to the same pipe or file or
         autoreply, there should be two different deliveries, so build a unique
  @@ -5183,7 +5196,8 @@
         duplicate testing and recording delivery, and also for retrying. */


         addr->unique =
  -        string_sprintf("%s:%s", addr->address, addr->parent->unique + offset);
  +        string_sprintf("%s:%s", addr->address, addr->parent->unique +
  +          (testflag(addr->parent, af_homonym)? 3:0));


         addr->address_retry_key = addr->domain_retry_key =
           string_sprintf("T:%s", addr->unique);


  Index: filter.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/filter.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- filter.c    11 Nov 2005 10:02:04 -0000    1.7
  +++ filter.c    19 Dec 2005 12:25:21 -0000    1.8
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/filter.c,v 1.7 2005/11/11 10:02:04 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/filter.c,v 1.8 2005/12/19 12:25:21 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -2211,6 +2211,7 @@
         uschar *to = commands->args[mailarg_index_to].u;
         int size = 0;
         int ptr = 0;
  +      int badflag = 0;


         if (to == NULL) to = expand_string(US"$reply_address");
         while (isspace(*to)) to++;
  @@ -2283,11 +2284,15 @@
           while (isspace(*tt)) tt++;
           }


  -      if (log_addr == NULL) log_addr = string_sprintf("invalid-to-line");
  -        else log_addr[ptr] = 0;
  +      if (log_addr == NULL)
  +        {
  +        log_addr = string_sprintf(">**bad-reply**");
  +        badflag = af_bad_reply;
  +        }
  +      else log_addr[ptr] = 0;


         addr = deliver_make_addr(log_addr, FALSE);
  -      setflag(addr, af_pfr);
  +      setflag(addr, (af_pfr|badflag));
         if (commands->noerror) setflag(addr, af_ignore_error);
         addr->next = *generated;
         *generated = addr;


  Index: structs.h
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/structs.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- structs.h    12 Sep 2005 15:09:55 -0000    1.7
  +++ structs.h    19 Dec 2005 12:25:21 -0000    1.8
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/structs.h,v 1.7 2005/09/12 15:09:55 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/structs.h,v 1.8 2005/12/19 12:25:21 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -503,6 +503,7 @@
   #define af_include_affixes     0x00800000 /* delivered with affixes in RCPT */
   #define af_cert_verified       0x01000000 /* delivered with verified TLS cert */
   #define af_pass_message        0x02000000 /* pass message in bounces */
  +#define af_bad_reply           0x04000000 /* filter could not generate autoreply */


/* These flags must be propagated when a child is created */