ietf-mta-filters
[Top] [All Lists]

Message uniqueness in editheader

2003-05-03 11:12:54

RFC 3028 says:

,----
| 2.10.3.  Message Uniqueness in a Mailbox
| 
|    Implementations SHOULD NOT deliver a message to the same folder more
|    than once, even if a script explicitly asks for a message to be
|    written to a mailbox twice.
| 
|    The test for equality of two messages is implementation-defined.
| 
|    If a script asks for a message to be written to a mailbox twice, it
|    MUST NOT be treated as an error.
`----

It may be useful to discuss message uniqueness in the editheader
draft, so that the following code is well defined:

fileinto "INBOX.foo"
addheader "X-Sieve-Filtered" "<kim(_at_)job(_dot_)tld>";
fileinto "INBOX.foo"

Otherwise, it seems to me that

1) add original message to INBOX.foo
2) add modified message to INBOX.foo
3) add both original and modified message to INBOX.foo

can all be valid behavior, which I believe is unfortunate.

Suggested new section 6 below.

Note the wording that says which order the fileinto commands must be
executed.  Perhaps the specification doesn't have to guarantee the
order messages are inserted.

,----
| 6. Interaction with Sieve and other Sieve Extensions
| 
|    Tests and actions such as "exist" or "header" that examine
|    headers MUST examine the current state of a header as modified
|    by any actions that have taken place so far.  As an example,
|    in the following example, the if statement will always be true,
|    regardless of whether the message contains the header or not.
| 
|      addheader "X-Hello" "World";
|      if header :contains "X-Hello" "World" {
|        fileinto "INBOX.hi"
|      }
| 
|    Actions that create messages in storage or in transport to
|    MTAs MUST store and send messages with the current set of
|    header fields.
| 
|    A message modified by addheader, deleteheader, or replaceheader
|    MUST NOT be considered the same as the original message.  Compare
|    the discussion about message uniqueness in section 2.10.3 of RFC
|    3028.  This means the following code will always insert two
|    messages, the first one is always the original message and the
|    second the modified one.
| 
|      fileinto "INBOX.foo"
|      addheader "X-Sieve-Filtered" "<kim(_at_)job(_dot_)tld>";
|      fileinto "INBOX.foo"
`----


<Prev in Thread] Current Thread [Next in Thread>