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

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 README.SIEVE exim/exim-src/src sieve.c
ph10 2005/11/14 11:41:23 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog README.SIEVE 
    exim-src/src         sieve.c 
  Log:
  Apply the latest Sieve patches.


  Revision  Changes    Path
  1.257     +14 -0     exim/exim-doc/doc-txt/ChangeLog
  1.8       +4 -1      exim/exim-doc/doc-txt/README.SIEVE
  1.14      +78 -4     exim/exim-src/src/sieve.c


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.256
  retrieving revision 1.257
  diff -u -r1.256 -r1.257
  --- ChangeLog    14 Nov 2005 11:32:16 -0000    1.256
  +++ ChangeLog    14 Nov 2005 11:41:23 -0000    1.257
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.256 2005/11/14 11:32:16 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.257 2005/11/14 11:41:23 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -73,6 +73,20 @@
         always said "this is a copy of the message, including all the headers",
         even if body_only or headers_only was set. It now gives an appropriate
         message.
  +
  +PH/09 Applied a patch from the Sieve maintainer which:
  +
  +      o  fixes some comments
  +      o  adds the (disabled) notify extension core
  +      o  adds some debug output for the result of if/elsif tests
  +      o  points to the current vacation draft in the documentation
  +         and documents the missing references header update
  +
  +      and most important:
  +
  +      o  fixes a bug in processing the envelope test (when testing
  +         multiple envelope elements, the last element determinted the
  +         result)



Exim version 4.54

  Index: README.SIEVE
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/README.SIEVE,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- README.SIEVE    30 Aug 2005 10:55:52 -0000    1.7
  +++ README.SIEVE    14 Nov 2005 11:41:23 -0000    1.8
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/README.SIEVE,v 1.7 2005/08/30 10:55:52 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/README.SIEVE,v 1.8 2005/11/14 11:41:23 ph10 Exp $


                 Notes on the Sieve implementation for Exim


@@ -23,7 +23,7 @@
The Exim Sieve implementation offers the core as defined by draft
3028bis-4 (next version of RFC 3028 that fixes specification mistakes),
the "envelope" (3028bis), the "fileinto" (3028bis), the "copy" (RFC 3894)
-and the "vacation" (draft-ietf-sieve-vacation-02.txt) extension, the
+and the "vacation" (draft-ietf-sieve-vacation-04.txt) extension, the
"i;ascii-numeric" comparator (RFC 2244).

The Sieve filter is integrated in Exim and works very similar to the
@@ -119,6 +119,9 @@
"inbox". RFC 3028 requires that the user is notified of that condition.
This may be implemented in future by adding a header line to mails that
are filed into "inbox" due to an error in the filter.
+
+The automatic replies generated by "vacation" do not contain an updated
+"references" header field.


Semantics Of Keep

  Index: sieve.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/sieve.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- sieve.c    30 Aug 2005 10:55:52 -0000    1.13
  +++ sieve.c    14 Nov 2005 11:41:23 -0000    1.14
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/sieve.c,v 1.13 2005/08/30 10:55:52 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/sieve.c,v 1.14 2005/11/14 11:41:23 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -28,10 +28,13 @@
   /* Undefine it for UNIX-style \n end-of-line terminators (default). */
   #undef RFC_EOL


  -/* Define this for development of the subaddress Sieve extension.   */
  +/* Define this for development of the Sieve extension "notify".     */
  +#undef NOTIFY
  +
  +/* Define this for the Sieve extension "subaddress".                */
   #define SUBADDRESS


  -/* Define this for the vacation Sieve extension.                    */
  +/* Define this for the Sieve extension "vacation".                  */
   #define VACATION


   /* Must be >= 1                                                     */
  @@ -52,6 +55,9 @@
     int keep;
     int require_envelope;
     int require_fileinto;
  +#ifdef NOTIFY
  +  int require_notify;
  +#endif
   #ifdef SUBADDRESS
     int require_subaddress;
   #endif
  @@ -102,6 +108,10 @@
   static const struct String str_fileinto={ str_fileinto_c, 8 };
   static uschar str_envelope_c[]="envelope";
   static const struct String str_envelope={ str_envelope_c, 8 };
  +#ifdef NOTIFY
  +static uschar str_notify_c[]="notify";
  +static const struct String str_notify={ str_notify_c, 6 };
  +#endif
   #ifdef SUBADDRESS
   static uschar str_subaddress_c[]="subaddress";
   static const struct String str_subaddress={ str_subaddress_c, 10 };
  @@ -1886,7 +1896,7 @@
       return -1;
       }
     *cond=0;
  -  for (e=env; e->character; ++e)
  +  for (e=env; e->length!=-1 && !*cond; ++e)
       {
       const uschar *envelopeExpr=CUS 0;
       uschar *envelope=US 0;
  @@ -2054,6 +2064,11 @@
         filter->errmsg=CUS "missing test";
         return -1;
         }
  +    if ((filter_test != FTEST_NONE && debug_selector != 0) ||
  +        (debug_selector & D_filter) != 0)
  +      {
  +      if (exec) debug_printf("if %s\n",cond?"true":"false");
  +      }
       m=parse_block(filter,exec ? cond : 0, generated);
       if (m==-1 || m==2) return m;
       if (m==0)
  @@ -2075,6 +2090,11 @@
             filter->errmsg=CUS "missing test";
             return -1;
             }
  +        if ((filter_test != FTEST_NONE && debug_selector != 0) ||
  +            (debug_selector & D_filter) != 0)
  +          {
  +          if (exec) debug_printf("elsif %s\n",cond?"true":"false");
  +          }
           m=parse_block(filter,exec && unsuccessful ? cond : 0, generated);
           if (m==-1 || m==2) return m;
           if (m==0)
  @@ -2187,7 +2207,7 @@
       fileinto-command =  "fileinto" { fileinto-options } string ";"
       fileinto-options =
       fileinto-options =) [ ":copy" ]
  -   */
  +    */


       struct String folder;
       uschar *s;
  @@ -2241,6 +2261,54 @@
         }
       if (parse_semicolon(filter)==-1) return -1;
       }
  +#ifdef NOTIFY
  +  else if (parse_identifier(filter,CUS "notify"))
  +    {
  +    /*
  +    notify-command =  "notify" { notify-options } ";"
  +    notify-options =  [":method" string]
  +                      [":message" string]
  +    */
  +
  +    int m;
  +    struct String method;
  +    struct String message;
  +
  +    if (!filter->require_notify)
  +      {
  +      filter->errmsg=CUS "missing previous require \"notify\";";
  +      return -1;
  +      }
  +    method.character=(uschar*)0;
  +    method.length=-1;
  +    message.character=(uschar*)0;
  +    message.length=-1;
  +    for (;;)
  +      {
  +      if (parse_white(filter)==-1) return -1;
  +      if (parse_identifier(filter,CUS ":method")==1)
  +        {
  +        if (parse_white(filter)==-1) return -1;
  +        if ((m=parse_string(filter,&method))!=1)
  +          {
  +          if (m==0) filter->errmsg=CUS "method string expected";
  +          return -1;
  +          }
  +        }
  +      else if (parse_identifier(filter,CUS ":message")==1)
  +        {
  +        if (parse_white(filter)==-1) return -1;
  +        if ((m=parse_string(filter,&message))!=1)
  +          {
  +          if (m==0) filter->errmsg=CUS "message string expected";
  +          return -1;
  +          }
  +        }
  +      else break;
  +      }
  +    if (parse_semicolon(filter)==-1) return -1;
  +    }
  +#endif
   #ifdef VACATION
     else if (parse_identifier(filter,CUS "vacation"))
       {
  @@ -2548,6 +2616,9 @@
   filter->keep=1;
   filter->require_envelope=0;
   filter->require_fileinto=0;
  +#ifdef NOTIFY
  +filter->require_notify=0;
  +#endif
   #ifdef SUBADDRESS
   filter->require_subaddress=0;
   #endif
  @@ -2613,6 +2684,9 @@
       {
       if (eq_octet(check,&str_envelope,0)) filter->require_envelope=1;
       else if (eq_octet(check,&str_fileinto,0)) filter->require_fileinto=1;
  +#ifdef NOTIFY
  +    else if (eq_octet(check,&str_notify,0)) filter->require_notify=1;
  +#endif
   #ifdef SUBADDRESS
       else if (eq_octet(check,&str_subaddress,0)) filter->require_subaddress=1;
   #endif