-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.264 2005/11/15 11:23:43 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.265 2005/11/21 10:09:12 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
PH/16 In autoreply, treat an empty string for "once" the same as unset.
+PH/17 A further patch from the Sieve maintainer: "Introduce the new Sieve
+ extension "envelope-auth". The code is finished and in agreement with
+ other implementations, but there is no documentation so far and in fact,
+ nobody wrote the draft yet. This extension is currently #undef'ed, thus
+ not changing the active code.
+
+ Print executed "if" and "elsif" statements when debugging is used. This
+ helps a great deal to understand what a filter does.
+
+ Document more things not specified clearly in RFC3028. I had all this
+ sorted out, when out of a sudden new issues came to my mind. Oops."
+
Exim version 4.54
-----------------
-$Cambridge: exim/doc/doc-txt/README.SIEVE,v 1.8 2005/11/14 11:41:23 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/README.SIEVE,v 1.9 2005/11/21 10:09:13 ph10 Exp $
Notes on the Sieve implementation for Exim
been reset.
-Semantics of Fileinto
+Semantics Of Fileinto
RFC 3028 does not specify if "fileinto" tries to create a mail folder,
in case it does not exist. This implementation allows to configure
the Exim specification for details.
-Sieve Syntax and Semantics
+Allof And Anyof Test
+
+RFC 3028 does not specify if these tests use shortcut/lazy evaluation.
+Exim uses shortcut evaluation.
+
+
+Action Reordering
+
+RFC 3028 does not specify if actions may be executed out of order.
+Exim may execute them out of order, e.g. messages may be filed to
+folders or forwarded in a different order than specified, because
+those actions only setup delivery, but do not execute it themselves.
+
+
+Wildcard Matching
+
+RFC 3028 is not exactly clear if comparators act on unicode characters
+or on octets containing their UTF-8 representation. As it turns out,
+many implementations go the second way. This does not make a difference
+but for wildcard matching and octet-wise comparison. Working on unicode
+means a dot matches a character. Working on UTF-8 means the dot matches
+a single octet of a multi-octet sequence. For octet-wise comparisons,
+working on UTF-8 means arbitrary byte sequences in headers can not be
+matches, as they are rarely correct UTF-8 sequences and can thus not be
+expressed as string literal. This implementation works on unicode, but
+this may be changed in case RFC3028bis specifies this issue safe and sound.
+
+
+Sieve Syntax And Semantics
RFC 3028 confuses syntax and semantics sometimes. It uses a generic
grammar as syntax for commands and tests and performs many checks during
-/* $Cambridge: exim/src/src/sieve.c,v 1.15 2005/11/15 10:08:25 ph10 Exp $ */
+/* $Cambridge: exim/src/src/sieve.c,v 1.16 2005/11/21 10:09:13 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/* Undefine it for UNIX-style \n end-of-line terminators (default). */
#undef RFC_EOL
+/* Define this for development of the Sieve extension "envelope-auth". */
+#undef ENVELOPE_AUTH
+
/* Define this for development of the Sieve extension "notify". */
#undef NOTIFY
int keep;
int require_envelope;
int require_fileinto;
+#ifdef ENVELOPE_AUTH
+ int require_envelope_auth;
+#endif
#ifdef NOTIFY
int require_notify;
#endif
static const struct String str_cc={ str_cc_c, 2 };
static uschar str_bcc_c[]="Bcc";
static const struct String str_bcc={ str_bcc_c, 3 };
+static uschar str_auth_c[]="auth";
+static const struct String str_auth={ str_auth_c, 4 };
static uschar str_sender_c[]="Sender";
static const struct String str_sender={ str_sender_c, 6 };
static uschar str_resent_from_c[]="Resent-From";
static const struct String str_fileinto={ str_fileinto_c, 8 };
static uschar str_envelope_c[]="envelope";
static const struct String str_envelope={ str_envelope_c, 8 };
+#ifdef ENVELOPE_AUTH
+static uschar str_envelope_auth_c[]="envelope-auth";
+static const struct String str_envelope_auth={ str_envelope_auth_c, 13 };
+#endif
#ifdef NOTIFY
static uschar str_notify_c[]="notify";
static const struct String str_notify={ str_notify_c, 6 };
<envelope-part: string-list> <key-list: string-list>
envelope-part is case insensitive "from" or "to"
+#ifdef ENVELOPE_AUTH
+ envelope-part =/ "auth"
+#endif
*/
enum Comparator comparator=COMP_EN_ASCII_CASEMAP;
case ADDRPART_DOMAIN: envelopeExpr=CUS "$domain"; break;
}
}
+#ifdef ENVELOPE_AUTH
+ else if (eq_asciicase(e,&str_auth,0))
+ {
+ switch (addressPart)
+ {
+ case ADDRPART_ALL: envelopeExpr=CUS "$authenticated_sender"; break;
+#ifdef SUBADDRESS
+ case ADDRPART_USER:
+#endif
+ case ADDRPART_LOCALPART: envelopeExpr=CUS "${local_part:$authenticated_sender}"; break;
+ case ADDRPART_DOMAIN: envelopeExpr=CUS "${domain:$authenticated_sender}"; break;
+#ifdef SUBADDRESS
+ case ADDRPART_DETAIL: envelopeExpr=CUS 0; break;
+#endif
+ }
+ }
+#endif
else
{
filter->errmsg=CUS "invalid envelope string";
{
if (exec) debug_printf("if %s\n",cond?"true":"false");
}
+ if ((filter_test != FTEST_NONE && debug_selector != 0) ||
+ (debug_selector & D_filter) != 0)
+ {
+ if (exec) debug_printf("if %s\n",cond?"true":"false");
+ }
m=parse_block(filter,exec ? cond : 0, generated);
if (m==-1 || m==2) return m;
if (m==0)
{
if (exec) debug_printf("elsif %s\n",cond?"true":"false");
}
+ if ((filter_test != FTEST_NONE && debug_selector != 0) ||
+ (debug_selector & D_filter) != 0)
+ {
+ if (exec) debug_printf("elsif %s\n",cond?"true":"false");
+ }
m=parse_block(filter,exec && unsuccessful ? cond : 0, generated);
if (m==-1 || m==2) return m;
if (m==0)
filter->keep=1;
filter->require_envelope=0;
filter->require_fileinto=0;
+#ifdef ENVELOPE_AUTH
+filter->require_envelope_auth=0;
+#endif
#ifdef NOTIFY
filter->require_notify=0;
#endif
{
if (eq_octet(check,&str_envelope,0)) filter->require_envelope=1;
else if (eq_octet(check,&str_fileinto,0)) filter->require_fileinto=1;
+#ifdef ENVELOPE_AUTH
+ else if (eq_octet(check,&str_envelope_auth,0)) filter->require_envelope_auth=1;
+#endif
#ifdef NOTIFY
else if (eq_octet(check,&str_notify,0)) filter->require_notify=1;
#endif