system; make Exim output off_t size for -bV so tests can be appropriate.
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.290 2006/02/10 14:25:43 ph10 Exp $
+$Cambridge: 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
-------------------------------------------
$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.
+
Exim version 4.60
-/* $Cambridge: exim/src/src/exim.c,v 1.31 2006/02/07 11:19:00 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.c,v 1.32 2006/02/10 16:29:20 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
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));
}
-/* $Cambridge: exim/src/src/globals.c,v 1.46 2006/02/10 14:25:43 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.c,v 1.47 2006/02/10 16:29:20 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
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"?";
-/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.11 2006/02/07 11:19:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.12 2006/02/10 16:29:20 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
for (i = 0; i < 5; i++)
{
double d;
+ uschar *which = NULL;
if (q == NULL) d = default_value; else
{
}
}
+ /* 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;
+ }
}
return OK;
-$Cambridge: exim/test/README,v 1.1 2006/02/06 16:07:10 ph10 Exp $
+$Cambridge: exim/test/README,v 1.2 2006/02/10 16:29:20 ph10 Exp $
EXPORTABLE EXIM TEST SUITE
--------------------------
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
This command must be at the head of a script. If the Exim binary does not have
--- /dev/null
+# 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
--- /dev/null
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmaX-0005vi-00 => userx <userx@test.ex> R=r1 T=t1
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
-dddS,dC
+500S,0C
ddd d
ddd d
-dddS,dC
+0S,0C
ddd d
ddd d
--- /dev/null
+3221225472S,0C
+ddd d
+ddd d
--- /dev/null
+Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+ (envelope-from <CALLER@test.ex>)
+ id 10HmaX-0005vi-00
+ for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+Test message
#! /usr/bin/perl -w
-# $Cambridge: exim/test/runtest,v 1.3 2006/02/09 14:50:58 ph10 Exp $
+# $Cambridge: 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 #
$have_ipv4 = 1;
$have_ipv6 = 1;
+$have_largefiles = 0;
$test_start = 1;
$test_end = $test_top = 8999;
# Maildirsize data
if (/^\d+S,\d+C\s*$/)
{
- print MUNGED "dddS,dC\n";
+ print MUNGED;
while (<IN>)
{
last if !/^\d+ \d+\s*$/;
/^Transports:/ ||
/^log selectors =/ ||
/^cwd=/ ||
- /^Fixed never_users:/
+ /^Fixed never_users:/ ||
+ /^Size of off_t:/
);
}
# 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");
{
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;
%parm_support = @temp;
}
- if (/^Lookups: (.*)/)
+ elsif (/^Lookups: (.*)/)
{
print;
@temp = split /(\s+)/, $1;
%parm_lookups = @temp;
}
- if (/^Authenticators: (.*)/)
+ elsif (/^Authenticators: (.*)/)
{
print;
@temp = split /(\s+)/, $1;
%parm_authenticators = @temp;
}
- if (/^Routers: (.*)/)
+ elsif (/^Routers: (.*)/)
{
print;
@temp = split /(\s+)/, $1;
# 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;
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/)
{
next if $have_ipv4;
-# maildir with maildirsize for quota handling
+# maildirsize for quota handling
exim -d -odi nofile@test.ex
Message for nofile
****
--- /dev/null
+# maildirsize for quota handling quota > 2G
+need_largefiles
+# Set a quota that is greater than 2G
+exim -DQUOTA=3G -odi userx@test.ex
+Test message
+****
+no_msglog_check