-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.318 2006/03/01 11:24:04 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.319 2006/03/01 11:40:51 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
information. It now does the scan only if it needs to find either the
size of the count of files.
+PH/51 Added ${time_eval: to convert Exim time strings into seconds.
+
Exim version 4.60
-----------------
-$Cambridge: exim/doc/doc-txt/NewStuff,v 1.92 2006/02/28 12:42:47 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/NewStuff,v 1.93 2006/03/01 11:40:51 ph10 Exp $
New Features in Exim
--------------------
When set true, it allows the authenticated_sender option's value to be
used, even if Exim has not authenticated as a client.
+PH/16 The expansion ${time_eval:<string>} converts an Exim time string such as
+ 2d4h1m into a number of seconds.
+
Version 4.60
------------
-/* $Cambridge: exim/src/src/expand.c,v 1.55 2006/02/28 14:54:54 ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.56 2006/03/01 11:40:51 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
US"from_utf8",
US"local_part",
US"quote_local_part",
+ US"time_eval",
US"time_interval"};
enum {
EOP_FROM_UTF8,
EOP_LOCAL_PART,
EOP_QUOTE_LOCAL_PART,
+ EOP_TIME_EVAL,
EOP_TIME_INTERVAL };
static uschar *op_table_main[] = {
/* Handle time period formating */
+ case EOP_TIME_EVAL:
+ {
+ int n = readconf_readtime(sub, 0, FALSE);
+ if (n < 0)
+ {
+ expand_string_message = string_sprintf("string \"%s\" is not an "
+ "Exim time interval in \"%s\" operator", sub, name);
+ goto EXPAND_FAILED;
+ }
+ sprintf(CS var_buffer, "%d", n);
+ yield = string_cat(yield, &size, &ptr, var_buffer, Ustrlen(var_buffer));
+ continue;
+ }
+
case EOP_TIME_INTERVAL:
{
int n;
strlen: ${strlen:}
strlen: ${strlen:a}
strlen: ${strlen:abcdefgh}
+time_eval: ${time_eval:10s}
+time_eval: ${time_eval:2h}
+time_eval: ${time_eval:1d5m}
+time_eval: ${time_eval:1w2d3h4m5s}
+time_eval: ${time_eval:14}
+time_eval: ${time_eval:rhubarb}
time_interval: ${time_interval:0}
time_interval: ${time_interval:44}
time_interval: ${time_interval:999999}
> strlen: 0
> strlen: 1
> strlen: 8
+> time_eval: 10
+> time_eval: 7200
+> time_eval: 86700
+> time_eval: 788645
+> Failed: string "14" is not an Exim time interval in "time_eval" operator
+> Failed: string "rhubarb" is not an Exim time interval in "time_eval" operator
> time_interval: 0s
> time_interval: 44s
> time_interval: 1w4d13h46m39s