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

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Tony Finch
Data:  
Para: exim-cvs
Asunto: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog NewStuff exim/exim-src/exim_monitor em_globals.c exim/exim-src/src acl.c globals.c globals.h receive.c smtp_in.c
fanf2 2005/05/23 16:28:38 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog NewStuff 
    exim-src/exim_monitor em_globals.c 
    exim-src/src         acl.c globals.c globals.h receive.c 
                         smtp_in.c 
  Log:
  Add control=fakedefer to go with control=fakereject.


  Revision  Changes    Path
  1.140     +2 -0      exim/exim-doc/doc-txt/ChangeLog
  1.43      +7 -0      exim/exim-doc/doc-txt/NewStuff
  1.7       +1 -1      exim/exim-src/exim_monitor/em_globals.c
  1.33      +11 -4     exim/exim-src/src/acl.c
  1.25      +2 -2      exim/exim-src/src/globals.c
  1.17      +2 -2      exim/exim-src/src/globals.h
  1.18      +6 -4      exim/exim-src/src/receive.c
  1.18      +1 -1      exim/exim-src/src/smtp_in.c


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.139
  retrieving revision 1.140
  diff -u -u -r1.139 -r1.140
  --- ChangeLog    17 May 2005 15:00:04 -0000    1.139
  +++ ChangeLog    23 May 2005 15:28:37 -0000    1.140
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.139 2005/05/17 15:00:04 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.140 2005/05/23 15:28:37 fanf2 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -32,6 +32,8 @@
         mode fix the return path as well as the Sender: header line, and to
         add a /name= option so that you can make the user's friendly name appear
         in the header line.
  +
  +TF/03 Added the control = fakedefer ACL modifier.



Exim version 4.51

  Index: NewStuff
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/NewStuff,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -u -r1.42 -r1.43
  --- NewStuff    17 May 2005 15:00:04 -0000    1.42
  +++ NewStuff    23 May 2005 15:28:37 -0000    1.43
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.42 2005/05/17 15:00:04 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/NewStuff,v 1.43 2005/05/23 15:28:37 fanf2 Exp $


New Features in Exim
--------------------
@@ -89,6 +89,13 @@

         (b) The envelope sender address is forced to be the same as the
             submission mode sender address.
  +
  +TF/02 The control = fakereject ACL modifier now has a fakedefer counterpart,
  +      which works in exactly the same way except it causes a fake SMTP 450
  +      response after the message data instead of a fake SMTP 550 response.
  +      You must take care when using fakedefer because it will cause messages
  +      to be duplicated when the sender retries. Therefore you should not use
  +      fakedefer if the message will be delivered normally.



Version 4.51

  Index: em_globals.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/exim_monitor/em_globals.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -u -r1.6 -r1.7
  --- em_globals.c    29 Apr 2005 11:54:23 -0000    1.6
  +++ em_globals.c    23 May 2005 15:28:38 -0000    1.7
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/exim_monitor/em_globals.c,v 1.6 2005/04/29 11:54:23 tom Exp $ */
  +/* $Cambridge: exim/exim-src/exim_monitor/em_globals.c,v 1.7 2005/05/23 15:28:38 fanf2 Exp $ */


   /*************************************************
   *                Exim Monitor                    *
  @@ -145,7 +145,7 @@
   BOOL    dont_deliver           = FALSE;


   #ifdef WITH_CONTENT_SCAN
  -BOOL   fake_reject             = FALSE;
  +int     fake_response          = OK;
   #endif


   header_line *header_last       = NULL;


  Index: acl.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/acl.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -u -r1.32 -r1.33
  --- acl.c    17 May 2005 15:00:04 -0000    1.32
  +++ acl.c    23 May 2005 15:28:38 -0000    1.33
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/acl.c,v 1.32 2005/05/17 15:00:04 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/acl.c,v 1.33 2005/05/23 15:28:38 fanf2 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -421,7 +421,7 @@
   #ifdef WITH_CONTENT_SCAN
     CONTROL_NO_MBOX_UNSPOOL,
   #endif
  -  CONTROL_FAKEREJECT, CONTROL_NO_MULTILINE };
  +  CONTROL_FAKEDEFER, CONTROL_FAKEREJECT, CONTROL_NO_MULTILINE };


/* Bit map vector of which controls are not allowed at certain times. For
each control, there's a bitmap of dis-allowed times. For some, it is easier to
@@ -469,6 +469,11 @@
#endif

     (unsigned int)
  +  ~((1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_RCPT)|       /* fakedefer */
  +    (1<<ACL_WHERE_PREDATA)|(1<<ACL_WHERE_DATA)|
  +    (1<<ACL_WHERE_MIME)),
  +
  +  (unsigned int)
     ~((1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_RCPT)|       /* fakereject */
       (1<<ACL_WHERE_PREDATA)|(1<<ACL_WHERE_DATA)|
       (1<<ACL_WHERE_MIME)),
  @@ -501,6 +506,7 @@
   #ifdef WITH_CONTENT_SCAN
     { US"no_mbox_unspool",        CONTROL_NO_MBOX_UNSPOOL, FALSE},
   #endif
  +  { US"fakedefer",              CONTROL_FAKEDEFER, TRUE},
     { US"fakereject",             CONTROL_FAKEREJECT, TRUE},
     { US"submission",             CONTROL_SUBMISSION, TRUE}
     };
  @@ -2101,19 +2107,20 @@
         no_multiline_responses = TRUE;
         break;


  +      case CONTROL_FAKEDEFER:
         case CONTROL_FAKEREJECT:
  -      fake_reject = TRUE;
  +      fake_response = (control_type == CONTROL_FAKEDEFER) ? DEFER : FAIL;
         if (*p == '/')
           {
           uschar *pp = p + 1;
           while (*pp != 0) pp++;
  -        fake_reject_text = expand_string(string_copyn(p+1, pp-p-1));
  +        fake_response_text = expand_string(string_copyn(p+1, pp-p-1));
           p = pp;
           }
          else
           {
           /* Explicitly reset to default string */
  -        fake_reject_text = US"Your message has been rejected but is being kept for evaluation.\nIf it was a legitimate message, it may still be delivered to the target recipient(s).";
  +        fake_response_text = US"Your message has been rejected but is being kept for evaluation.\nIf it was a legitimate message, it may still be delivered to the target recipient(s).";
           }
         break;



  Index: globals.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -u -r1.24 -r1.25
  --- globals.c    10 May 2005 10:19:11 -0000    1.24
  +++ globals.c    23 May 2005 15:28:38 -0000    1.25
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.c,v 1.24 2005/05/10 10:19:11 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.c,v 1.25 2005/05/23 15:28:38 fanf2 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -512,8 +512,8 @@
   BOOL    extract_addresses_remove_arguments = TRUE;
   uschar *extra_local_interfaces = NULL;


  -BOOL    fake_reject            = FALSE;
  -uschar *fake_reject_text       = US"Your message has been rejected but is being kept for evaluation.\nIf it was a legitimate message, it may still be delivered to the target recipient(s).";
  +int     fake_response          = OK;
  +uschar *fake_response_text     = US"Your message has been rejected but is being kept for evaluation.\nIf it was a legitimate message, it may still be delivered to the target recipient(s).";
   int     filter_n[FILTER_VARIABLE_COUNT];
   BOOL    filter_running         = FALSE;
   int     filter_sn[FILTER_VARIABLE_COUNT];


  Index: globals.h
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -u -r1.16 -r1.17
  --- globals.h    10 May 2005 10:19:11 -0000    1.16
  +++ globals.h    23 May 2005 15:28:38 -0000    1.17
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.h,v 1.16 2005/05/10 10:19:11 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.h,v 1.17 2005/05/23 15:28:38 fanf2 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -309,8 +309,8 @@
   extern BOOL    extract_addresses_remove_arguments; /* Controls -t behaviour */
   extern uschar *extra_local_interfaces; /* Local, non-listen interfaces */


  -extern BOOL    fake_reject;            /* TRUE if fake reject is to be given */
  -extern uschar *fake_reject_text;       /* Option for the fakereject control statement: can contain user defined message. Default is in globals.c. */
  +extern int     fake_response;          /* Fake FAIL or DEFER response to data */
  +extern uschar *fake_response_text;     /* User defined message for the above. Default is in globals.c. */
   extern int     filter_n[FILTER_VARIABLE_COUNT]; /* filter variables */
   extern BOOL    filter_running;         /* TRUE while running a filter */
   extern int     filter_sn[FILTER_VARIABLE_COUNT]; /* variables set by system filter */


  Index: receive.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/receive.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -u -r1.17 -r1.18
  --- receive.c    17 May 2005 15:00:04 -0000    1.17
  +++ receive.c    23 May 2005 15:28:38 -0000    1.18
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/receive.c,v 1.17 2005/05/17 15:00:04 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/receive.c,v 1.18 2005/05/23 15:28:38 fanf2 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -3477,8 +3477,9 @@
       {
       if (smtp_reply == NULL)
         {
  -      if (fake_reject)
  -        smtp_respond(550,TRUE,fake_reject_text);
  +      if (fake_response != OK)
  +        smtp_respond(fake_response == DEFER ? 450 : 550,
  +                     TRUE, fake_response_text);
         else
           smtp_printf("250 OK id=%s\r\n", message_id);
         if (host_checking)
  @@ -3487,8 +3488,9 @@
         }
       else if (smtp_reply[0] != 0)
         {
  -      if (fake_reject && (smtp_reply[0] == '2'))
  -        smtp_respond(550,TRUE,fake_reject_text);
  +      if (fake_response != OK && (smtp_reply[0] == '2'))
  +        smtp_respond(fake_response == DEFER ? 450 : 550,
  +                     TRUE, fake_response_text);
         else
           smtp_printf("%.1024s\r\n", smtp_reply);
         }


  Index: smtp_in.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/smtp_in.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -u -r1.17 -r1.18
  --- smtp_in.c    27 Apr 2005 13:29:32 -0000    1.17
  +++ smtp_in.c    23 May 2005 15:28:38 -0000    1.18
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/smtp_in.c,v 1.17 2005/04/27 13:29:32 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/smtp_in.c,v 1.18 2005/05/23 15:28:38 fanf2 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -809,7 +809,7 @@
   acl_warn_headers = NULL;
   queue_only_policy = FALSE;
   deliver_freeze = FALSE;                              /* Can be set by ACL */
  -fake_reject = FALSE;                                 /* Can be set by ACL */
  +fake_response = OK;                                  /* Can be set by ACL */
   #ifdef WITH_CONTENT_SCAN
   no_mbox_unspool = FALSE;                             /* Can be set by ACL */
   #endif