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

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: exim-cvs
題目: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src filter.c exim/exim-test-orig/AutoTest/scripts 079
ph10 2005/10/03 12:26:22 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         filter.c 
    exim-test-orig/AutoTest/scripts 079 
  Log:
  Tidy up "personal" testing in line with RFCs 2369, 2929, 3834.


  Revision  Changes    Path
  1.243     +6 -0      exim/exim-doc/doc-txt/ChangeLog
  1.5       +33 -6     exim/exim-src/src/filter.c
  1.3       +2 -1      exim/exim-test-orig/AutoTest/scripts/079


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.242
  retrieving revision 1.243
  diff -u -r1.242 -r1.243
  --- ChangeLog    3 Oct 2005 09:56:42 -0000    1.242
  +++ ChangeLog    3 Oct 2005 11:26:21 -0000    1.243
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.242 2005/10/03 09:56:42 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.243 2005/10/03 11:26:21 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -14,6 +14,12 @@
         the CVS lines, and there was a missing #if HAVE_IPV6 in host.c.


   PH/03 Typo: missing ".o" in src/pcre/Makefile.
  +
  +PH/04 Tighten up "personal" tests: Instead of testing for any "List-"
  +      header line, restrict the check to what is listed in RFCs 2369 and 2929.
  +      Also, for "Auto-Submitted", treat anything other than "no" as
  +      non-personal, in accordance with RFC 3834. (Previously it treated
  +      anything starting "auto-" as non-personal.)



Exim version 4.53

  Index: filter.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/filter.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- filter.c    27 Jun 2005 14:29:43 -0000    1.4
  +++ filter.c    3 Oct 2005 11:26:21 -0000    1.5
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/filter.c,v 1.4 2005/06/27 14:29:43 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/filter.c,v 1.5 2005/10/03 11:26:21 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -2321,14 +2321,42 @@
   int to_count = 2;
   int from_count = 9;


-/* If any header line in the message starts with "List-", it is not
-a personal message. */
+/* If any header line in the message is a defined "List-" header field, it is
+not a personal message. We used to check for any header line that started with
+"List-", but this was tightened up for release 4.54. The check is now for
+"List-Id", defined in RFC 2929, or "List-Help", "List-Subscribe", "List-
+Unsubscribe", "List-Post", "List-Owner" or "List-Archive", all of which are
+defined in RFC 2369. We also scan for "Auto-Submitted"; if it is found to
+contain any value other than "no", the message is not personal (RFC 3834).
+Previously the test was for "auto-". */

   for (h = header_list; h != NULL; h = h->next)
     {
  -  if (h->type != htype_old && h->slen > 5 &&
  -      strncmpic(h->text, US"List-", 5) == 0)
  -    return FALSE;
  +  uschar *s;
  +  if (h->type == htype_old) continue;
  +
  +  if (strncmpic(h->text, US"List-", 5) == 0)
  +    {
  +    s = h->text + 5;
  +    if (strncmpic(s, US"Id:", 3) == 0 ||
  +        strncmpic(s, US"Help:", 5) == 0 ||
  +        strncmpic(s, US"Subscribe:", 10) == 0 ||
  +        strncmpic(s, US"Unsubscribe:", 12) == 0 ||
  +        strncmpic(s, US"Post:", 5) == 0 ||
  +        strncmpic(s, US"Owner:", 6) == 0 ||
  +        strncmpic(s, US"Archive:", 8) == 0)
  +      return FALSE;
  +    }
  +
  +  else if (strncmpic(h->text, US"Auto-submitted:", 15) == 0)
  +    {
  +    s = h->text + 15;
  +    while (isspace(*s)) s++;
  +    if (strncmpic(s, US"no", 2) != 0) return FALSE;
  +    s += 2;
  +    while (isspace(*s)) s++;
  +    if (*s != 0) return FALSE;
  +    }
     }


   /* Set up "my" address */
  @@ -2384,7 +2412,6 @@
       "^daemon@", "^root@", "^listserv@", "^majordomo@", "^.*?-request@",
       "^owner-[^@]+@", self, self_from, psself, psself_from) &&


  -  header_match(US"auto-submitted:", FALSE, FALSE, NULL, 1, "auto-") &&
     header_match(US"precedence:", FALSE, FALSE, NULL, 3, "bulk","list","junk") &&


     (sender_address == NULL || sender_address[0] != 0);


  Index: 079
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/scripts/079,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- 079    1 Aug 2005 15:01:13 -0000    1.2
  +++ 079    3 Oct 2005 11:26:22 -0000    1.3
  @@ -53,6 +53,7 @@
   0
   exim -bf aux/079.f-4 -f anon@ymous
   To: abcdefgh@???
  +Auto-Submitted: no
   ****
   # Not personal
   0
  @@ -64,7 +65,7 @@
   0
   exim -bf aux/079.f-4 -f anon@ymous
   To: ph10@???
  -List-information: xxxx
  +List-Unsubscribe: xxxx
   ****
   # Not personal
   0