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

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: exim-cvs
Subject: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src exim.c globals.c exim/exim-src/src/transports appendfile.c exim/exim-test README runtest exim/exim-test/confs 5007 exim/exi
ph10 2006/02/10 16:29:21 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         exim.c globals.c 
    exim-src/src/transports appendfile.c 
    exim-test            README runtest 
    exim-test/mail/5005.nofile maildirsize 
    exim-test/mail/5005.userx maildirsize 
    exim-test/mail/5006.userx maildirsize 
    exim-test/scripts/5000-maildir 5005 
  Added files:
    exim-test/confs      5007 
    exim-test/log        5007 
    exim-test/mail/5007.userx maildirsize 
    exim-test/mail/5007.userx/new 1.myhost.test.ex 
    exim-test/scripts/5000-maildir 5007 
  Log:
  Give error if overflow in quota setting in appendfile on a 32-bit
  system; make Exim output off_t size for -bV so tests can be appropriate.


  Revision  Changes    Path
  1.291     +9 -0      exim/exim-doc/doc-txt/ChangeLog
  1.32      +2 -0      exim/exim-src/src/exim.c
  1.47      +1 -1      exim/exim-src/src/globals.c
  1.12      +17 -0     exim/exim-src/src/transports/appendfile.c
  1.2       +7 -0      exim/exim-test/README
  1.1       +49 -0     exim/exim-test/confs/5007 (new)
  1.1       +3 -0      exim/exim-test/log/5007 (new)
  1.2       +1 -1      exim/exim-test/mail/5005.nofile/maildirsize
  1.2       +1 -1      exim/exim-test/mail/5005.userx/maildirsize
  1.2       +1 -1      exim/exim-test/mail/5006.userx/maildirsize
  1.1       +3 -0      exim/exim-test/mail/5007.userx/maildirsize (new)
  1.1       +9 -0      exim/exim-test/mail/5007.userx/new/1.myhost.test.ex (new)
  1.4       +25 -9     exim/exim-test/runtest
  1.2       +1 -1      exim/exim-test/scripts/5000-maildir/5005
  1.1       +7 -0      exim/exim-test/scripts/5000-maildir/5007 (new)


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.290
  retrieving revision 1.291
  diff -u -r1.290 -r1.291
  --- ChangeLog    10 Feb 2006 14:25:43 -0000    1.290
  +++ ChangeLog    10 Feb 2006 16:29:20 -0000    1.291
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.290 2006/02/10 14:25:43 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.291 2006/02/10 16:29:20 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -119,6 +119,15 @@
   PH/20 Added $auth1, $auth2, $auth3 to contain authentication data (as well as
         $1, $2, $3) because the numerical variables can be reset during some
         expansion items (e.g. "match"), thereby losing the authentication data.
  +
  +PH/21 Make -bV show the size of off_t variables so that the test suite can
  +      decide whether to run tests for quotas > 2G.
  +
  +PH/22 Test the values given for quota, quota_filecount, quota_warn_threshold,
  +      mailbox_size, and mailbox_filecount in the appendfile transport. If a
  +      filecount value is greater than 2G or if a quota value is greater than 2G
  +      on a system where the size of off_t is not greater than 4, a panic error
  +      is given.





  Index: exim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/exim.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- exim.c    7 Feb 2006 11:19:00 -0000    1.31
  +++ exim.c    10 Feb 2006 16:29:20 -0000    1.32
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/exim.c,v 1.31 2006/02/07 11:19:00 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/exim.c,v 1.32 2006/02/10 16:29:20 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1012,6 +1012,8 @@
       fprintf(f, "%d:", (unsigned int)fixed_never_users[i]);
     fprintf(f, "%d\n", (unsigned int)fixed_never_users[i]);
     }
  +
  +fprintf(f, "Size of off_t: %d\n", sizeof(off_t));
   }




  Index: globals.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/globals.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- globals.c    10 Feb 2006 14:25:43 -0000    1.46
  +++ globals.c    10 Feb 2006 16:29:20 -0000    1.47
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/globals.c,v 1.46 2006/02/10 14:25:43 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/globals.c,v 1.47 2006/02/10 16:29:20 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1224,7 +1224,7 @@
   uschar *warnmsg_recipients     = NULL;
   BOOL    write_rejectlog        = TRUE;


  -uschar *version_copyright      = US"Copyright (c) University of Cambridge 2005";
  +uschar *version_copyright      = US"Copyright (c) University of Cambridge 2006";
   uschar *version_date           = US"?";
   uschar *version_cnumber        = US"????";
   uschar *version_string         = US"?";


  Index: appendfile.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/transports/appendfile.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- appendfile.c    7 Feb 2006 11:19:02 -0000    1.11
  +++ appendfile.c    10 Feb 2006 16:29:20 -0000    1.12
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/transports/appendfile.c,v 1.11 2006/02/07 11:19:02 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/transports/appendfile.c,v 1.12 2006/02/10 16:29:20 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -271,6 +271,7 @@
   for (i = 0; i < 5; i++)
     {
     double d;
  +  uschar *which = NULL;


     if (q == NULL) d = default_value; else
       {
  @@ -316,32 +317,48 @@
         }
       }


  +  /* Set each value, checking for possible overflow. */
  +
     switch (i)
       {
       case 0:
  +    if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4) which = US"quota";
       ob->quota_value = (off_t)d;
       q = ob->quota_filecount;
       break;


       case 1:
  +    if (d >= 2.0*1024.0*1024.0*1024.0) which = US"quota_filecount";
       ob->quota_filecount_value = (int)d;
       q = ob->quota_warn_threshold;
       break;


       case 2:
  +    if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4)
  +      which = US"quota_warn_threshold";
       ob->quota_warn_threshold_value = (off_t)d;
       q = ob->mailbox_size_string;
       default_value = -1.0;
       break;


       case 3:
  +    if (d >= 2.0*1024.0*1024.0*1024.0 && sizeof(off_t) <= 4)
  +      which = US"mailbox_size";;
       ob->mailbox_size_value = (off_t)d;
       q = ob->mailbox_filecount_string;
       break;


       case 4:
  +    if (d >= 2.0*1024.0*1024.0*1024.0) which = US"mailbox_filecount";
       ob->mailbox_filecount_value = (int)d;
       break;
  +    }
  +
  +  if (which != NULL)
  +    {
  +    *errmsg = string_sprintf("%s value %.10g is too large (overflow) in "
  +      "%s transport", which, d, tblock->name);
  +    return FAIL;
       }
     }



  Index: README
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/README,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- README    6 Feb 2006 16:07:10 -0000    1.1
  +++ README    10 Feb 2006 16:29:20 -0000    1.2
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-test/README,v 1.1 2006/02/06 16:07:10 ph10 Exp $
  +$Cambridge: exim/exim-test/README,v 1.2 2006/02/10 16:29:20 ph10 Exp $


EXPORTABLE EXIM TEST SUITE
--------------------------
@@ -641,6 +641,13 @@

This command must be at the head of a script. If no IPv6 interface has been
found, the entire script is skipped, and a comment is output.
+
+
+ need_largefiles
+
+This command must be at the head of a script. If the Exim binary does not
+suppport large files (off_t is <= 4), the entire script is skipped, and a
+comment is output.


     need_move_frozen_messages


  Index: runtest
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/runtest,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- runtest    9 Feb 2006 14:50:58 -0000    1.3
  +++ runtest    10 Feb 2006 16:29:20 -0000    1.4
  @@ -1,6 +1,6 @@
   #! /usr/bin/perl -w


-# $Cambridge: exim/exim-test/runtest,v 1.3 2006/02/09 14:50:58 ph10 Exp $
+# $Cambridge: exim/exim-test/runtest,v 1.4 2006/02/10 16:29:20 ph10 Exp $

###############################################################################
# This is the controlling script for the "new" test suite for Exim. It should #
@@ -36,6 +36,7 @@

$have_ipv4 = 1;
$have_ipv6 = 1;
+$have_largefiles = 0;

   $test_start = 1;
   $test_end = $test_top = 8999;
  @@ -614,7 +615,7 @@
     # Maildirsize data
     if (/^\d+S,\d+C\s*$/)
       {
  -    print MUNGED "dddS,dC\n";
  +    print MUNGED;
       while (<IN>)
         {
         last if !/^\d+ \d+\s*$/;
  @@ -788,7 +789,8 @@
                   /^Transports:/ ||
                   /^log selectors =/ ||
                   /^cwd=/ ||
  -                /^Fixed never_users:/
  +                /^Fixed never_users:/ ||
  +                /^Size of off_t:/
                   );
         }


@@ -1459,7 +1461,7 @@

# Various Unix management commands are recognized

  -if (/^(ln|ls|du|mkdir|mkfifo|touch|cp)\s/ ||
  +if (/^(ln|ls|du|mkdir|mkfifo|touch|cp|cat)\s/ ||
       /^sudo (rmdir|rm|chown|chmod)\s/)
     {
     run_system("$_ >>test-stdout 2>>test-stderr");
  @@ -1952,9 +1954,14 @@
     {
     my(@temp);


- if (/^Exim version/) { print; next; }
+ if (/^Exim version/) { print; }

  -  if (/^Support for: (.*)/)
  +  elsif (/^Size of off_t: (\d+)/)
  +    {
  +    $have_largefiles = 1 if $1 > 4;
  +    }
  +
  +  elsif (/^Support for: (.*)/)
       {
       print;
       @temp = split /(\s+)/, $1;
  @@ -1962,7 +1969,7 @@
       %parm_support = @temp;
       }


  -  if (/^Lookups: (.*)/)
  +  elsif (/^Lookups: (.*)/)
       {
       print;
       @temp = split /(\s+)/, $1;
  @@ -1970,7 +1977,7 @@
       %parm_lookups = @temp;
       }


  -  if (/^Authenticators: (.*)/)
  +  elsif (/^Authenticators: (.*)/)
       {
       print;
       @temp = split /(\s+)/, $1;
  @@ -1978,7 +1985,7 @@
       %parm_authenticators = @temp;
       }


  -  if (/^Routers: (.*)/)
  +  elsif (/^Routers: (.*)/)
       {
       print;
       @temp = split /(\s+)/, $1;
  @@ -1990,7 +1997,7 @@
     # that the basic transport name is set, and then the name with each of the
     # options.


  -  if (/^Transports: (.*)/)
  +  elsif (/^Transports: (.*)/)
       {
       print;
       @temp = split /(\s+)/, $1;
  @@ -2852,6 +2859,15 @@
         if (/^no_stdout_check/)  { $stdout_skip = 1; next; }
         if (/^rmfiltertest/)     { $rmfiltertest = 1; next; }
         if (/^sortlog/)          { $sortlog = 1; next; }
  +
  +      if (/^need_largefiles/)
  +        {
  +        next if $have_largefiles;
  +        print ">>> Large file support is needed for test $testno, but is not available: skipping\n";
  +        $docheck = 0;      # don't check output
  +        undef $_;          # pretend EOF
  +        last;
  +        }


         if (/^need_ipv4/)
           {


Index: 5007
====================================================================
# Exim test configuration 5007

QUOTA=500

exim_path = EXIM_PATH
host_lookup_order = bydns
primary_hostname = myhost.test.ex
rfc1413_query_timeout = 0s
spool_directory = DIR/spool
log_file_path = DIR/spool/log/%slog
gecos_pattern = ""
gecos_name = CALLER_NAME


# ----- Main settings -----

delay_warning =
qualify_domain = test.ex


# ----- Routers -----

begin routers

  r1:
    driver = accept
    transport = t1


# ----- Transports -----

begin transports

  t1:
    driver = appendfile
    directory = DIR/test-mail/$local_part
    user = CALLER
    maildir_format
    maildir_use_size_file
    quota = QUOTA



# ----- Retry -----

begin retry

* * F,1d,1d


# End

Index: 5007
====================================================================
1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@??? U=CALLER P=local S=sss
1999-03-02 09:44:33 10HmaX-0005vi-00 => userx <userx@???> R=r1 T=t1
1999-03-02 09:44:33 10HmaX-0005vi-00 Completed

  Index: maildirsize
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/mail/5005.nofile/maildirsize,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- maildirsize    7 Feb 2006 10:39:57 -0000    1.1
  +++ maildirsize    10 Feb 2006 16:29:20 -0000    1.2
  @@ -1,3 +1,3 @@
  -dddS,dC
  +500S,0C
   ddd d
   ddd d


  Index: maildirsize
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/mail/5005.userx/maildirsize,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- maildirsize    7 Feb 2006 10:39:58 -0000    1.1
  +++ maildirsize    10 Feb 2006 16:29:20 -0000    1.2
  @@ -1,2 +1,2 @@
  -dddS,dC
  +500S,0C
   ddd d


  Index: maildirsize
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/mail/5006.userx/maildirsize,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- maildirsize    7 Feb 2006 10:39:58 -0000    1.1
  +++ maildirsize    10 Feb 2006 16:29:20 -0000    1.2
  @@ -1,3 +1,3 @@
  -dddS,dC
  +0S,0C
   ddd d
   ddd d


Index: maildirsize
====================================================================
3221225472S,0C
ddd d
ddd d

  Index: 1.myhost.test.ex
  ====================================================================
  Received: from CALLER by myhost.test.ex with local (Exim x.yz)
      (envelope-from <CALLER@???>)
      id 10HmaX-0005vi-00
      for userx@???; Tue, 2 Mar 1999 09:44:33 +0000
  Message-Id: <E10HmaX-0005vi-00@???>
  From: CALLER_NAME <CALLER@???>
  Date: Tue, 2 Mar 1999 09:44:33 +0000


Test message

Index: 5007
====================================================================
# maildirsize for quota handling quota > 2G
need_largefiles
# Set a quota that is greater than 2G
exim -DQUOTA=3G -odi userx@???
Test message
****
no_msglog_check

  Index: 5005
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/scripts/5000-maildir/5005,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 5005    7 Feb 2006 10:54:50 -0000    1.1
  +++ 5005    10 Feb 2006 16:29:21 -0000    1.2
  @@ -1,4 +1,4 @@
  -# maildir with maildirsize for quota handling
  +# maildirsize for quota handling
   exim -d -odi nofile@???
   Message for nofile
   ****