compile time.
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.273 2005/12/12 11:41:50 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.274 2005/12/12 15:58:53 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
PH/05 If group was specified without a user on a router, and no group or user
was specified on a transport, the group from the router was ignored.
+PH/06 Increased the number of ACL variables to 20 of each type, and arranged
+ for visible compile-time settings that can be used to change these
+ numbers, for those that want even more. Backwards compatibility with old
+ spool files has been maintained. However, going back to a previous Exim
+ release will lost any variables that are in spool files.
+
Exim version 4.60
-----------------
-$Cambridge: exim/doc/doc-txt/NewStuff,v 1.79 2005/12/12 11:02:44 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/NewStuff,v 1.80 2005/12/12 15:58:53 ph10 Exp $
New Features in Exim
--------------------
data, etc. are also ignored. If IP literals are enabled, the ipliteral
router declines to handle IPv6 literal addresses.
+PH/01 There are now 20 of each type of ACL variable by default (instead of 10).
+ It is also possible to change the numbers by setting ACL_CVARS and/or
+ ACL_MVARS in Local/Makefile. Backward compatibility is maintained if you
+ upgrade to this release with existing messages containing ACL variable
+ settings on the queue. However, going in the other direction
+ (downgrading) will not be compatible; the values of ACL variables will be
+ lost.
+
Version 4.60
------------
-$Cambridge: exim/doc/doc-txt/OptionLists.txt,v 1.13 2005/12/06 10:25:59 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/OptionLists.txt,v 1.14 2005/12/12 15:58:53 ph10 Exp $
LISTS OF EXIM OPTIONS
---------------------
Option Type Description
------------------------------------------------------------------------------
+ACL_CVARS=20 optional* number of acl_c variables
+ACL_MVARS=20 optional* number of acl_m variables
ALT_CONFIG_PREFIX optional restricts location of -C files
ALT_CONFIG_ROOT_ONLY optional* privileged -C needs root (not exim)
APPENDFILE_MODE optional*
-$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.38 2005/11/15 10:08:25 ph10 Exp $
+$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.39 2005/12/12 15:58:53 ph10 Exp $
EXIM ACKNOWLEDGEMENTS
Philip Hazel
Lists created: 20 November 2002
-Last updated: 15 November 2005
+Last updated: 12 December 2005
THE OLD LIST
Patch for MySQL non-data queries
David Saez Suggested patch for $sender_hostname lookup if needed
Support for the clamd virus scanner
+ Suggested patch for increased number of ACL variables
Jonathan Sambrook Suggested patch for expanding uid and gid lists
Peter Savitch Diagnosis of FPE bug when statvfs() fails on spool
Harald Schueler Patch for dn_expand() failure on truncated data
-$Cambridge: exim/src/README.UPDATING,v 1.9 2005/10/03 13:25:32 ph10 Exp $
+$Cambridge: exim/src/README.UPDATING,v 1.10 2005/12/12 15:58:53 ph10 Exp $
This document contains detailed information about incompatibilities that might
be encountered when upgrading from one release of Exim to another. The
that might affect a running system.
+Exim version 4.61
+-----------------
+
+The default number of ACL variables of each type has been increased to 20, and
+it's possible to compile Exim with more. You can safely upgrade to this release
+if you already have messages on the queue with saved ACL variable values.
+However, if you downgrade from this release with messages on the queue, any
+saved ACL values they may have will be lost.
+
+
Exim version 4.54
-----------------
-/* $Cambridge: exim/src/exim_monitor/em_globals.c,v 1.7 2005/05/23 15:28:38 fanf2 Exp $ */
+/* $Cambridge: exim/src/exim_monitor/em_globals.c,v 1.8 2005/12/12 15:58:53 ph10 Exp $ */
/*************************************************
* Exim Monitor *
#endif
-uschar *acl_var[ACL_C_MAX+ACL_M_MAX];
+uschar *acl_var[ACL_CVARS + ACL_MVARS];
uschar *active_hostname = NULL;
BOOL allow_unqualified_recipient = FALSE;
-/* $Cambridge: exim/src/src/acl.c,v 1.52 2005/12/06 10:25:59 ph10 Exp $ */
+/* $Cambridge: exim/src/src/acl.c,v 1.53 2005/12/12 15:58:53 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
if (c == ACLC_SET)
{
- if (Ustrncmp(s, "acl_", 4) != 0 || (s[4] != 'c' && s[4] != 'm') ||
- !isdigit(s[5]) || (!isspace(s[6]) && s[6] != '='))
+ int offset, max, n;
+ uschar *endptr;
+
+ if (Ustrncmp(s, "acl_", 4) != 0) goto BAD_ACL_VAR;
+ if (s[4] == 'c')
+ {
+ offset = 0;
+ max = ACL_CVARS;
+ }
+ else if (s[4] == 'm')
+ {
+ offset = ACL_CVARS;
+ max = ACL_MVARS;
+ }
+ else goto BAD_ACL_VAR;
+
+ n = Ustrtoul(s + 5, &endptr, 10);
+ if ((*endptr != 0 && *endptr != '=' && !isspace(*endptr)) || n >= max)
{
- *error = string_sprintf("unrecognized name after \"set\" in ACL "
- "modifier \"set %s\"", s);
+ BAD_ACL_VAR:
+ *error = string_sprintf("syntax error or unrecognized name after "
+ "\"set\" in ACL modifier \"set %s\"", s);
return NULL;
}
- cond->u.varnumber = s[5] - '0';
- if (s[4] == 'm') cond->u.varnumber += ACL_C_MAX;
- s += 6;
+ cond->u.varnumber = n + offset;
+ s = endptr;
while (isspace(*s)) s++;
}
if (cb->type == ACLC_SET)
{
int n = cb->u.varnumber;
- int t = (n < ACL_C_MAX)? 'c' : 'm';
- if (n >= ACL_C_MAX) n -= ACL_C_MAX;
+ int t = (n < ACL_CVARS)? 'c' : 'm';
+ if (n >= ACL_CVARS) n -= ACL_CVARS;
debug_printf("acl_%c%d ", t, n);
lhswidth += 7;
}
case ACLC_SET:
{
int old_pool = store_pool;
- if (cb->u.varnumber < ACL_C_MAX) store_pool = POOL_PERM;
+ if (cb->u.varnumber < ACL_CVARS) store_pool = POOL_PERM;
acl_var[cb->u.varnumber] = string_copy(arg);
store_pool = old_pool;
}
-/* $Cambridge: exim/src/src/config.h.defaults,v 1.7 2005/08/01 13:20:28 ph10 Exp $ */
+/* $Cambridge: exim/src/src/config.h.defaults,v 1.8 2005/12/12 15:58:53 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
any data just defines the existence of the variable; it won't get included
in config.h unless some value is defined in Local/Makefile. */
+#define ACL_CVARS 20
+#define ACL_MVARS 20
+
#define ALT_CONFIG_PREFIX
#define ALT_CONFIG_ROOT_ONLY
-/* $Cambridge: exim/src/src/expand.c,v 1.50 2005/12/12 12:05:08 ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.51 2005/12/12 15:58:53 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/* This table must be kept in alphabetical order. */
static var_entry var_table[] = {
- { "acl_c0", vtype_stringptr, &acl_var[0] },
- { "acl_c1", vtype_stringptr, &acl_var[1] },
- { "acl_c2", vtype_stringptr, &acl_var[2] },
- { "acl_c3", vtype_stringptr, &acl_var[3] },
- { "acl_c4", vtype_stringptr, &acl_var[4] },
- { "acl_c5", vtype_stringptr, &acl_var[5] },
- { "acl_c6", vtype_stringptr, &acl_var[6] },
- { "acl_c7", vtype_stringptr, &acl_var[7] },
- { "acl_c8", vtype_stringptr, &acl_var[8] },
- { "acl_c9", vtype_stringptr, &acl_var[9] },
- { "acl_m0", vtype_stringptr, &acl_var[10] },
- { "acl_m1", vtype_stringptr, &acl_var[11] },
- { "acl_m2", vtype_stringptr, &acl_var[12] },
- { "acl_m3", vtype_stringptr, &acl_var[13] },
- { "acl_m4", vtype_stringptr, &acl_var[14] },
- { "acl_m5", vtype_stringptr, &acl_var[15] },
- { "acl_m6", vtype_stringptr, &acl_var[16] },
- { "acl_m7", vtype_stringptr, &acl_var[17] },
- { "acl_m8", vtype_stringptr, &acl_var[18] },
- { "acl_m9", vtype_stringptr, &acl_var[19] },
{ "acl_verify_message", vtype_stringptr, &acl_verify_message },
{ "address_data", vtype_stringptr, &deliver_address_data },
{ "address_file", vtype_stringptr, &address_file },
int first = 0;
int last = var_table_size;
+/* Handle ACL variables, which are not in the table because their number may
+vary depending on a build-time setting. */
+
+if (Ustrncmp(name, "acl_", 4) == 0)
+ {
+ int offset, max, n;
+ uschar *endptr;
+
+ if (name[4] == 'm')
+ {
+ offset = ACL_CVARS;
+ max = ACL_MVARS;
+ }
+ else if (name[4] == 'c')
+ {
+ offset = 0;
+ max = ACL_CVARS;
+ }
+ else return NULL;
+
+ n = Ustrtoul(name + 5, &endptr, 10);
+ if (*endptr != 0 || n >= max) return NULL;
+ return (acl_var[offset + n] == NULL)? US"" : acl_var[offset + n];
+ }
+
+/* For all other variables, search the table */
+
while (last > first)
{
uschar *s, *domain;
if (c < 0) { last = middle; continue; }
/* Found an existing variable. If in skipping state, the value isn't needed,
- and we want to avoid processing (such as looking up up the host name). */
+ and we want to avoid processing (such as looking up the host name). */
if (skipping) return US"";
-/* $Cambridge: exim/src/src/globals.c,v 1.43 2005/12/06 10:25:59 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.c,v 1.44 2005/12/12 15:58:53 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
uschar *acl_smtp_starttls = NULL;
uschar *acl_smtp_vrfy = NULL;
BOOL acl_temp_details = FALSE;
-uschar *acl_var[ACL_C_MAX+ACL_M_MAX];
+uschar *acl_var[ACL_CVARS + ACL_MVARS];
uschar *acl_verify_message = NULL;
header_line *acl_warn_headers = NULL;
string_item *acl_warn_logged = NULL;
-/* $Cambridge: exim/src/src/globals.h,v 1.31 2005/12/06 10:25:59 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.h,v 1.32 2005/12/12 15:58:53 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
extern uschar *acl_smtp_starttls; /* ACL run for STARTTLS */
extern uschar *acl_smtp_vrfy; /* ACL run for VRFY */
extern BOOL acl_temp_details; /* TRUE to give details for 4xx error */
-extern uschar *acl_var[ACL_C_MAX+ACL_M_MAX]; /* User variables */
+extern uschar *acl_var[ACL_CVARS+ACL_MVARS]; /* User ACL variables */
extern uschar *acl_verify_message; /* User message for verify failure */
extern header_line *acl_warn_headers; /* Warning headers added by ACL */
extern string_item *acl_warn_logged; /* Logged lines */
-/* $Cambridge: exim/src/src/macros.h,v 1.20 2005/11/14 16:09:54 ph10 Exp $ */
+/* $Cambridge: exim/src/src/macros.h,v 1.21 2005/12/12 15:58:53 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
#define WAIT_NAME_MAX 50
-/* The numbers of connection and message variables for ACLs */
-
-#define ACL_C_MAX 10
-#define ACL_M_MAX 10
-
/* Fixed option values for all PCRE functions */
#define PCRE_COPT 0 /* compile */
-/* $Cambridge: exim/src/src/smtp_in.c,v 1.26 2005/09/13 11:13:27 ph10 Exp $ */
+/* $Cambridge: exim/src/src/smtp_in.c,v 1.27 2005/12/12 15:58:53 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
ratelimiters_mail = NULL; /* Updated by ratelimit ACL condition */
/* Note that ratelimiters_conn persists across resets. */
-for (i = 0; i < ACL_M_MAX; i++) acl_var[ACL_C_MAX + i] = NULL;
+/* The message variables follow the connection variables. */
+
+for (i = 0; i < ACL_MVARS; i++) acl_var[ACL_CVARS + i] = NULL;
/* The message body variables use malloc store. They may be set if this is
not the first message in an SMTP session and the previous message caused them
/* Reset ACL connection variables */
-for (i = 0; i < ACL_C_MAX; i++) acl_var[i] = NULL;
+for (i = 0; i < ACL_CVARS; i++) acl_var[i] = NULL;
/* Allow for trailing 0 in the command buffer. */
-/* $Cambridge: exim/src/src/spool_in.c,v 1.13 2005/08/09 13:31:53 ph10 Exp $ */
+/* $Cambridge: exim/src/src/spool_in.c,v 1.14 2005/12/12 15:58:53 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
one exception. DO NOT change the default value of dont_deliver, because it may
be forced by an external setting. */
-for (n = 0; n < ACL_C_MAX + ACL_M_MAX; n++) acl_var[n] = NULL;
+for (n = 0; n < ACL_CVARS + ACL_MVARS; n++) acl_var[n] = NULL;
authenticated_id = NULL;
authenticated_sender = NULL;
{
if (Ufgets(big_buffer, big_buffer_size, f) == NULL) goto SPOOL_READ_ERROR;
if (big_buffer[0] != '-') break;
-
big_buffer[Ustrlen(big_buffer) - 1] = 0;
+
+ /* For backward compatibility, we recognize "-acl", which was used before the
+ number of ACL variables changed. Its variable number is 0-9 for connection
+ variables, and 10-19 for message variables. */
+
if (Ustrncmp(big_buffer, "-acl ", 5) == 0)
{
int index, count;
if (sscanf(CS big_buffer + 5, "%d %d", &index, &count) != 2)
goto SPOOL_FORMAT_ERROR;
- /* Ignore if index too big - might be if a later release with more
- variables built this spool file. */
- if (index < ACL_C_MAX + ACL_M_MAX)
+ acl_var[index] = store_get(count + 1);
+ if (fread(acl_var[index], 1, count+1, f) < count) goto SPOOL_READ_ERROR;
+ acl_var[index][count] = 0;
+ }
+
+ /* Nowadays we use "-aclc" and "-aclm" for the different types of ACL
+ variable, because Exim may be built with different numbers of them. */
+
+ else if (Ustrncmp(big_buffer, "-aclc ", 6) == 0)
+ {
+ int index, count;
+ if (sscanf(CS big_buffer + 6, "%d %d", &index, &count) != 2)
+ goto SPOOL_FORMAT_ERROR;
+ if (index < ACL_CVARS)
{
acl_var[index] = store_get(count + 1);
if (fread(acl_var[index], 1, count+1, f) < count) goto SPOOL_READ_ERROR;
acl_var[index][count] = 0;
}
}
+
+ else if (Ustrncmp(big_buffer, "-aclm ", 6) == 0)
+ {
+ int index, count;
+ if (sscanf(CS big_buffer + 6, "%d %d", &index, &count) != 2)
+ goto SPOOL_FORMAT_ERROR;
+ if (index < ACL_MVARS)
+ {
+ index += ACL_CVARS;
+ acl_var[index] = store_get(count + 1);
+ if (fread(acl_var[index], 1, count+1, f) < count) goto SPOOL_READ_ERROR;
+ acl_var[index][count] = 0;
+ }
+ }
+
+ /* Other values */
+
else if (Ustrcmp(big_buffer, "-local") == 0) sender_local = TRUE;
else if (Ustrcmp(big_buffer, "-localerror") == 0)
local_error_message = TRUE;
-/* $Cambridge: exim/src/src/spool_out.c,v 1.8 2005/06/27 14:29:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/spool_out.c,v 1.9 2005/12/12 15:58:53 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/* Preserve any ACL variables that are set. Because the values may contain
newlines, we use an explicit length. */
-for (i = 0; i < ACL_C_MAX + ACL_M_MAX; i++)
+for (i = 0; i < ACL_CVARS; i++)
{
if (acl_var[i] != NULL)
- fprintf(f, "-acl %d %d\n%s\n", i, Ustrlen(acl_var[i]), acl_var[i]);
+ fprintf(f, "-aclc %d %d\n%s\n", i, Ustrlen(acl_var[i]), acl_var[i]);
+ }
+
+for (i = 0; i < ACL_MVARS; i++)
+ {
+ int j = i + ACL_CVARS;
+ if (acl_var[j] != NULL)
+ fprintf(f, "-aclm %d %d\n%s\n", i, Ustrlen(acl_var[j]), acl_var[j]);
}
/* Now any other data that needs to be remembered. */