draft-ietf-sieve-editheader-04.txt   draft-ietf-sieve-editheader-05.txt 
Network Working Group Jutta Degener Network Working Group Jutta Degener
Internet Draft Philip Guenther Internet Draft Philip Guenther
Expires: September 2006 Sendmail, Inc. Expires: January 2007 Sendmail, Inc.
Sieve Email Filtering: Editheader Extension Sieve Email Filtering: Editheader Extension
draft-ietf-sieve-editheader-04.txt draft-ietf-sieve-editheader-05.txt
Status of this memo Status of this memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
skipping to change at page 2, line 7 skipping to change at page 2, line 7
1. Introduction 1. Introduction
Email header fields are a flexible and easy to understand means Email header fields are a flexible and easy to understand means
of communication between email processors. of communication between email processors.
This extension enables sieve scripts to interact with other This extension enables sieve scripts to interact with other
components that consume or produce header fields by allowing components that consume or produce header fields by allowing
the script to delete and add header fields. the script to delete and add header fields.
2. Conventions used. 2. Conventions used.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [KEYWORDS].
Conventions for notations are as in [SIEVE] section 1.1, including Conventions for notations are as in [SIEVE] section 1.1, including
use of [KEYWORDS] and the "Usage:" label for the definition of use of the "Usage:" label for the definition of action and tagged
action and tagged arguments syntax. arguments syntax.
The term "header field" is used here as in [IMAIL] to mean a The term "header field" is used here as in [IMAIL] to mean a
logical line of an email message header. logical line of an email message header.
The capability string associated with the extension defined in The capability string associated with the extension defined in
this document is "editheader". this document is "editheader".
3. Action addheader 3. Action addheader
Usage: "addheader" [":last"] <field-name: string> <value: string> Usage: "addheader" [":last"] <field-name: string> <value: string>
The addheader action adds a header field to the existing message The addheader action adds a header field to the existing message
header. The field-name MUST be a valid 7-bit US-ASCII header header. If the field-name is not a valid 7-bit US-ASCII header
field name as described by the [IMAIL] "field-name" nonterminal field name as described by the [IMAIL] "field-name" nonterminal
syntax element. The addheader action does not affect Sieve's syntax element, the implementation MUST flag an error. The
implicit keep. addheader action does not affect Sieve's implicit keep.
If the specified field value does not match the RFC 2822 If the specified field value does not match the RFC 2822
"unstructured" nonterminal syntax element or exceeds a length "unstructured" nonterminal syntax element or exceeds a length
limit set by the implementation, the implementation MUST either limit set by the implementation, the implementation MUST either
flag an error or encode the field using folding white space and flag an error or encode the field using folding white space and
the encodings described in [RFC2047] or [RFC2231] to be compliant the encodings described in [RFC2047] or [RFC2231] to be compliant
with RFC 2822. with RFC 2822.
An implementation MAY impose a length limit onto the size of An implementation MAY impose a length limit onto the size of
the encoded header field; such a limit MUST NOT be less the encoded header field; such a limit MUST NOT be less
skipping to change at page 3, line 24 skipping to change at page 3, line 24
Sieve's implicit keep. Sieve's implicit keep.
The field-name is mandatory and always matched as a case-insensitive The field-name is mandatory and always matched as a case-insensitive
US-ASCII string. The field-name MUST be a valid 7-bit header US-ASCII string. The field-name MUST be a valid 7-bit header
field name as described by the [IMAIL] "field-name" nonterminal field name as described by the [IMAIL] "field-name" nonterminal
syntax element. syntax element.
The value-patterns, if specified, restrict which occurrences of The value-patterns, if specified, restrict which occurrences of
the header field are deleted to those whose values match any of the header field are deleted to those whose values match any of
the specified value-patterns, the matching being according to the specified value-patterns, the matching being according to
the match-type and comparator. the match-type and comparator and performed as if by the "header"
test. In particular, leading and trailing whitespace in the
field values is ignored.
If :index <fieldno> is specified, the attempts to match a value If :index <fieldno> is specified, the attempts to match a value
are limited to the <fieldno> occurrence of the named header are limited to the <fieldno> occurrence of the named header
field, beginning at 1, the first named header field. If :last field, beginning at 1, the first named header field. If :last
is specified, the count is backwards; 1 denotes the last named is specified, the count is backwards; 1 denotes the last named
header field, 2 the second to last, and so on. The counting header field, 2 the second to last, and so on. The counting
happens before the <value-patterns> match, if any. For example: happens before the <value-patterns> match, if any. For example:
deleteheader :index 2 :contains "Received" "via carrier-pigeon" deleteheader :index 2 :contains "Received" "via carrier-pigeon"
deletes the second "Received:" header field if it contains deletes the second "Received:" header field if it contains
the string "via carrier-pigeon" (not the second Received: field the string "via carrier-pigeon" (not the second Received: field
that contains "via carrier-pigeon"). that contains "via carrier-pigeon").
It is not an error if no header fields match the conditions in It is not an error if no header fields match the conditions in
the deleteheader action or if the :index argument is greater the deleteheader action or if the :index argument is greater
than the number of named header fields. than the number of named header fields.
5. Interaction with Other Sieve Extensions 5. Interaction with Other Sieve Extensions
Actions that generate [MDN], [DSN], or similar disposition
messages MUST do so using the original, unmodified message header.
Similarly, if an error terminates processing of the script, the
original message header MUST be used when doing the implicit
keep required by [SIEVE] section 2.10.6.
All other actions that store or send the message MUST do so with
the current set of header fields.
Tests and actions such as "exists", "header", or "vacation" Tests and actions such as "exists", "header", or "vacation"
[VACATION] that examine header fields MUST examine the current [VACATION] that examine header fields MUST examine the current
state of a header as modified by any actions that have taken state of a header as modified by any actions that have taken
place so far. place so far.
As an example, the "header" test in the following fragment will As an example, the "header" test in the following fragment will
always evaluate to true, regardless of whether the incoming always evaluate to true, regardless of whether the incoming
message contained an "X-Hello" header field or not: message contained an "X-Hello" header field or not:
addheader "X-Hello" "World"; addheader "X-Hello" "World";
skipping to change at page 4, line 26 skipping to change at page 4, line 31
the implementation parses or decodes other parts of the message, the implementation parses or decodes other parts of the message,
then for the purposes of that parsing or decoding the implementation then for the purposes of that parsing or decoding the implementation
MAY ignore some or all changes made to those header fields. For MAY ignore some or all changes made to those header fields. For
example, in an implementation that supports the [BODY] extension, example, in an implementation that supports the [BODY] extension,
"body" tests may be unaffected by deleting or adding Content-Type "body" tests may be unaffected by deleting or adding Content-Type
or Content-Transfer-Encoding header fields. This does not rescind or Content-Transfer-Encoding header fields. This does not rescind
the requirement that changes to those header fields affect direct the requirement that changes to those header fields affect direct
tests; only the semantic side effects of changes to the fields tests; only the semantic side effects of changes to the fields
may be ignored. may be ignored.
Actions that store or send the message MUST do so with the current
set of header fields.
For the purpose of weeding out duplicates, a message modified For the purpose of weeding out duplicates, a message modified
by addheader or deleteheader MUST be considered the same as by addheader or deleteheader MUST be considered the same as
the original message. For example, in an implementation that the original message. For example, in an implementation that
obeys the constraint in [SIEVE] section 2.10.3 and does not deliver obeys the constraint in [SIEVE] section 2.10.3 and does not deliver
the same message to a folder more than once, the following the same message to a folder more than once, the following
code fragment code fragment
keep; keep;
addheader "X-Flavor" "vanilla"; addheader "X-Flavor" "vanilla";
keep; keep;
skipping to change at page 5, line 14 skipping to change at page 5, line 14
6. IANA Considerations 6. IANA Considerations
The following template specifies the IANA registration of the Sieve The following template specifies the IANA registration of the Sieve
extension specified in this document: extension specified in this document:
To: iana@iana.org To: iana@iana.org
Subject: Registration of new Sieve extension Subject: Registration of new Sieve extension
Capability name: editheader Capability name: editheader
Capability keyword: editheader Description: adds actions 'addheader' and 'deleteheader'
Capability arguments: N/A that modify the header of the message being
Standards Track/IESG-approved experimental RFC number: this RFC processed
Person and email address to contact for further information: RFC number: this RFC
Contact Address: Jutta Degener <jutta@pobox.com>
Jutta Degener
jutta@pobox.com
This information should be added to the list of sieve extensions This information should be added to the list of sieve extensions
given on http://www.iana.org/assignments/sieve-extensions. given on http://www.iana.org/assignments/sieve-extensions.
7. Security Considerations 7. Security Considerations
Someone with write access to a user's script storage may use this Someone with write access to a user's script storage may use this
extension to generate headers that a user would otherwise be extension to generate headers that a user would otherwise be
shielded from (by a gateway MTA that removes them). shielded from (by a gateway MTA that removes them).
skipping to change at page 5, line 48 skipping to change at page 5, line 46
are impervious to headers prefixed to a message, and will are impervious to headers prefixed to a message, and will
work with "addheader" unless :last is used. work with "addheader" unless :last is used.
Any decision mechanism in a user's filter that is based Any decision mechanism in a user's filter that is based
on headers is vulnerable to header spoofing. For example, on headers is vulnerable to header spoofing. For example,
if the user adds an APPROVED header or tag, a malicious sender if the user adds an APPROVED header or tag, a malicious sender
may add that tag or header themselves. One way to guard against may add that tag or header themselves. One way to guard against
this is to delete or rename any such headers or stamps prior this is to delete or rename any such headers or stamps prior
to processing the message. to processing the message.
Modifying the header of a message and then using the "reject"
action may let a sender 'probe' the logic of the sieve filter.
8. Acknowledgments 8. Acknowledgments
Thanks to Eric Allman, Cyrus Daboo, Matthew Elvey, Ned Freed, Thanks to Eric Allman, Cyrus Daboo, Matthew Elvey, Ned Freed,
Arnt Gulbrandsen, Simon Josefsson, Will Lee, William Leibzon, Arnt Gulbrandsen, Simon Josefsson, Will Lee, William Leibzon,
Mark E. Mallett, Chris Markle, Alexey Melnikov, Randall Schwartz, Mark E. Mallett, Chris Markle, Alexey Melnikov, Randall Schwartz,
Nigel Swinson, Kjetil Torgrim Homme, and Rand Wacker for extensive Nigel Swinson, Kjetil Torgrim Homme, and Rand Wacker for extensive
corrections and suggestions. corrections and suggestions.
9. Authors' Addresses 9. Authors' Addresses
skipping to change at page 6, line 42 skipping to change at page 6, line 34
This draft is intended as an extension to the Sieve mail filtering This draft is intended as an extension to the Sieve mail filtering
language. Sieve extensions are discussed on the MTA Filters mailing language. Sieve extensions are discussed on the MTA Filters mailing
list at <ietf-mta-filters@imc.org>. Subscription requests can list at <ietf-mta-filters@imc.org>. Subscription requests can
be sent to <ietf-mta-filters-request@imc.org> (send an email be sent to <ietf-mta-filters-request@imc.org> (send an email
message with the word "subscribe" in the body). message with the word "subscribe" in the body).
More information on the mailing list along with a WWW archive of More information on the mailing list along with a WWW archive of
back messages is available at <http://www.imc.org/ietf-mta-filters/>. back messages is available at <http://www.imc.org/ietf-mta-filters/>.
10.1 Changes from draft-ietf-sieve-editheader-03.txt 10.1 Changes from draft-ietf-sieve-editheader-04.txt
Change "Syntax:" to "Usage:" Ignore leading and trailing whitespace when matching header field
values.
Updated references Header modifications are ignored when continuing after an error
or generating MDNs or DSNs
10.2 Changes from draft-ietf-sieve-editheader-02.txt Added references for MDN and DSN
Clarify that value-patterns restrict which occurences are deleted. Update IANA registration to match 3028bis
Added [KEYWORDS] boilerplate text
Describe an invalid field-name to addheader as an error (might
be detected at runtime)
10.2 Changes from draft-ietf-sieve-editheader-03.txt
Change "Syntax:" to "Usage:".
Updated references.
10.3 Changes from draft-ietf-sieve-editheader-02.txt
Clarify that value-patterns restrict which occurrences are deleted.
Add informative reference to [BODY]. Add informative reference to [BODY].
10.3 Changes from draft-ietf-sieve-editheader-01.txt 10.4 Changes from draft-ietf-sieve-editheader-01.txt
Whitespace and line length tweaks noted by ID-nits. Whitespace and line length tweaks noted by ID-nits.
Clarified what is being counted by :index. Clarified what is being counted by :index.
Update the [SIEVE] reference to the I-D of the revision. Update the [SIEVE] reference to the I-D of the revision.
10.4 Changes from draft-ietf-sieve-editheader-00.txt 10.5 Changes from draft-ietf-sieve-editheader-00.txt
Updated IPR boilerplate to RFC 3978/3979. Updated IPR boilerplate to RFC 3978/3979.
Many corrections in response to WGLC comments. Of particular note: Many corrections in response to WGLC comments. Of particular note:
- correct a number of spelling and grammar errors - correct a number of spelling and grammar errors
- document that neither addheader nor deleteheader affects the - document that neither addheader nor deleteheader affects the
implicit keep implicit keep
- add normative references to RFC 2047 and RFC 2231 - add normative references to RFC 2047 and RFC 2231
- it is not an error for deleteheader to affect nothing - it is not an error for deleteheader to affect nothing
- change "foo.tld" to "foo.example.com" - change "foo.tld" to "foo.example.com"
- add an informative reference to [VACATION], citing it as an - add an informative reference to [VACATION], citing it as an
example of an action that examines header fields example of an action that examines header fields
- add weasel words about changes to fields that have secondary - add weasel words about changes to fields that have secondary
effects effects
- add security consideration for combination of header changes - add security consideration for combination of header changes
and "reject" and "reject"
10.5 Changes from draft-degener-sieve-editheader-03.txt 10.6 Changes from draft-degener-sieve-editheader-03.txt
Renamed to draft-ietf-sieve-editheader-00.txt; Renamed to draft-ietf-sieve-editheader-00.txt;
tweaked the title and abstract. tweaked the title and abstract.
Added Philip Guenther as co-author. Added Philip Guenther as co-author.
Updated IPR boilerplate. Updated IPR boilerplate.
10.6 Changes from draft-degener-sieve-editheader-02.txt 10.7 Changes from draft-degener-sieve-editheader-02.txt
Changed the duplicate restrictions from "messages with different Changed the duplicate restrictions from "messages with different
headers MUST be considered different" to their direct opposite, headers MUST be considered different" to their direct opposite,
"messages with different headers MUST be considered the same," "messages with different headers MUST be considered the same,"
as requested by workgroup members on the mailing list. as requested by workgroup members on the mailing list.
Expanded mention of header signature schemes to Security Expanded mention of header signature schemes to Security
Considerations. Considerations.
Added IANA Considerations section. Added IANA Considerations section.
Appendices Appendices
Appendix A. Normative References Appendix A. Normative References
[DSN] Moore, K. and G. Vaudreuil, "An Extensible Message Format
for Delivery Status Notifications", RFC 1894, January
1996.
[IMAIL] Resnick, P., "Internet Message Format", RFC 2822, April [IMAIL] Resnick, P., "Internet Message Format", RFC 2822, April
2001. 2001.
[KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", RFC 2119, March 1997. Requirement Levels", RFC 2119, March 1997.
[MDN] Fajman, R., "An Extensible Message Format for Message
Disposition Notifications", RFC 2298, March 1998.
[RFC2047] Moore, K., "MIME (Multipurpose Internet Mail [RFC2047] Moore, K., "MIME (Multipurpose Internet Mail
Extensions) Part Three: Message Header Extensions for Extensions) Part Three: Message Header Extensions for
Non-ASCII Text", RFC 2047, November 1996. Non-ASCII Text", RFC 2047, November 1996.
[RFC2231] Freed, N. and K. Moore, "MIME Parameter Value and [RFC2231] Freed, N. and K. Moore, "MIME Parameter Value and
Encoded Word Extensions: Character Sets, Languages, and Encoded Word Extensions: Character Sets, Languages, and
Continuations", RFC 2231, November 1997. Continuations", RFC 2231, November 1997.
[SIEVE] Guenther, P. and T. Showalter, "Sieve: A Mail Filtering [SIEVE] Guenther, P. and T. Showalter, "Sieve: A Mail Filtering
Language", draft-ietf-sieve-3028bis-06, March 2006. Language", draft-ietf-sieve-3028bis-08, July 2006.
Appendix B. Informative References Appendix B. Informative References
[BODY] Degener, J. and P. Guenther, "Sieve Email Filtering: [BODY] Degener, J. and P. Guenther, "Sieve Email Filtering:
[VACATION] Showalter, T. and N. Freed, "Sieve Email Filtering: [VACATION] Showalter, T. and N. Freed, "Sieve Email Filtering:
Vacation Extension", draft-ietf-sieve-vacation-05, Vacation Extension", draft-ietf-sieve-vacation-05,
December 2005 December 2005
Copyright Statement Copyright Statement
 End of changes. 23 change blocks. 
31 lines changed or deleted 62 lines changed or added

This html diff was produced by rfcdiff 1.32. The latest version is available from http://www.levkowetz.com/ietf/tools/rfcdiff/