draft-freed-sieve-notary-08.txt   draft-freed-sieve-notary-09.txt 
Network Working Group N. Freed Sieve Working Group N. Freed
Internet-Draft Oracle Internet-Draft Oracle
Intended status: Standards Track May 3, 2010 Intended status: Standards Track May 26, 2010
Expires: November 4, 2010 Expires: November 27, 2010
Sieve Email Filtering: Delivery Status Notifications and Deliver-By Sieve Email Filtering: Delivery Status Notifications and Deliver-By
Extensions Extensions
draft-freed-sieve-notary-08 draft-freed-sieve-notary-09
Abstract Abstract
This document describes the "envelope-dsn", "redirect-dsn", This document describes the "envelope-dsn", "redirect-dsn",
"envelope-deliverby", and "redirect-deliverby" extensions to the "envelope-deliverby", and "redirect-deliverby" extensions to the
Sieve email filtering language. The "envelope-dsn" and "envelope- Sieve email filtering language. The "envelope-dsn" and "envelope-
deliverby" extensions provide access to additional envelope deliverby" extensions provide access to additional envelope
information provided by the delivery status notification and information provided by the delivery status notification and
deliver-by SMTP extensions, respectively. The "redirect-dsn" and deliver-by SMTP extensions, respectively. The "redirect-dsn" and
"redirect-deliverby" extensions extend Sieve's redirect action to "redirect-deliverby" extensions extend Sieve's redirect action to
skipping to change at page 2, line 47 skipping to change at page 2, line 47
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on November 4, 2010. This Internet-Draft will expire on November 27, 2010.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2010 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the BSD License. described in the BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Conventions used in this document . . . . . . . . . . . . . . 4
3. Capability Identifiers . . . . . . . . . . . . . . . . . . . . 5
4. Envelope-dsn Extension . . . . . . . . . . . . . . . . . . . . 5
4.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 6
5. Envelope-deliverby Extension . . . . . . . . . . . . . . . . . 7
5.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 8
6. redirect-dsn extension . . . . . . . . . . . . . . . . . . . . 10
6.1. MAIL FROM address selection . . . . . . . . . . . . . . . 10
6.2. Example . . . . . . . . . . . . . . . . . . . . . . . . . 10
7. redirect-deliverby extension . . . . . . . . . . . . . . . . . 11
7.1. MAIL FROM address selection . . . . . . . . . . . . . . . 12
7.2. Example . . . . . . . . . . . . . . . . . . . . . . . . . 12
8. Security Considerations . . . . . . . . . . . . . . . . . . . 12
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14
10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 15
10.1. Normative references . . . . . . . . . . . . . . . . . . . 15
10.2. Informative references . . . . . . . . . . . . . . . . . . 15
Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 15
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 16
1. Introduction 1. Introduction
Sieve [RFC5228] is a language for filtering email messages at or Sieve [RFC5228] is a language for filtering email messages at or
around the time of final delivery. It is designed to be around the time of final delivery. It is designed to be
implementable on either a mail client or mail server. It is suitable implementable on either a mail client or mail server. It is suitable
for running on a mail server where users may not be allowed to for running on a mail server where users may not be allowed to
execute arbitrary programs, such as on black box Internet Message execute arbitrary programs, such as on black box Internet Message
Access Protocol [RFC3501] servers, as it has no user-controlled loops Access Protocol [RFC3501] servers, as it has no user-controlled loops
or the ability to run external programs. or the ability to run external programs.
skipping to change at page 8, line 14 skipping to change at page 8, line 46
It is important to note that the deliver-by by-time is decremented as It is important to note that the deliver-by by-time is decremented as
the message passes through the transport infrastructure. the message passes through the transport infrastructure.
Accordingly, it is not possible to tell what the message originator Accordingly, it is not possible to tell what the message originator
set the value to, only the amount of time remaining at the moment the set the value to, only the amount of time remaining at the moment the
sieve is run. Additionally, note that bytimerelative values can be sieve is run. Additionally, note that bytimerelative values can be
negative, making it necessary to either perform additional checks or negative, making it necessary to either perform additional checks or
else use a comparator which, unlike i;ascii-numeric, is capable of else use a comparator which, unlike i;ascii-numeric, is capable of
handling signed integers. handling signed integers.
5.1. Example 5.1. Examples
As noted above, this extension does not provide access to the As noted above, this extension does not provide access to the
originator's initial by-time setting for the simple reason that this originator's initial by-time setting for the simple reason that this
information is not part of the envelope. It can, however, be used to information is not part of the envelope. It can, however, be used to
check and see if the message was delivered within the alloted time. check and see if the message was delivered within the allotted time.
Note the additional check to see if the value is negative. Note the additional check to see if the value is negative.
require ["envelope", "envelope-deliverby", "relational", require ["envelope", "envelope-deliverby", "relational",
"comparator-i;ascii-numeric"]; "comparator-i;ascii-numeric"];
# Check to see if this message didn't make it in the time alloted by # Check to see if this message didn't make it in the time alloted by
# the originator. # the originator.
if anyof (envelope :contains "bytimerelative" "-", if anyof (envelope :contains "bytimerelative" "-",
envelope :value "eq" :comparator "i;ascii-numeric" envelope :value "eq" :comparator "i;ascii-numeric"
"bytimerelative" "0") "bytimerelative" "0")
{ {
# do whatever # do whatever
} }
This operation can be done more simply if the date and variables This operation can be done more simply if the date [RFC5270] and
extensions are available: variables [RFC5229] extensions are available:
require ["envelope", "envelope-deliverby", "relational", "date" require ["envelope", "envelope-deliverby", "relational", "date",
"variables"]; "variables"];
# Check to see if this message didn't make it in the time alloted by # Check to see if this message didn't make it in the time alloted by
# the originator. # the originator.
if currentdate :matches "iso8601" "*" { if currentdate :matches "iso8601" "*" {
set "cdate" "${0}"; set "cdate" "${0}";
if envelope :value "ge" "bytimeabsolute" "${cdate}") if envelope :value "ge" "bytimeabsolute" "${cdate}" {
{
# do whatever # do whatever
} }
} }
Note that there is no need to force the use of a particular time zone
since both currentdate and and the bytimeabsolute value are required
to default to the local time zone. A similar check could be written
using :zone if the action taken depends on the time
require ["envelope", "envelope-deliverby", "relational", "date",
"variables"];
# If the message didn't make it in time file it according to when it
# should have been received
if envelope :matches :zone "+0000" "bytimeabolute "*T*:*:*" {
set "bdate" "${0}";
set "bhour" "${2}";
if currentdate :zone "+0000" :value "lt" "iso8601" "${bdate}")
fileinto "missed-${bhour}";
}
}
6. redirect-dsn extension 6. redirect-dsn extension
The "redirect-dsn" extension does not define any new tests or The "redirect-dsn" extension does not define any new tests or
actions, rather, it adds two new arguments, NOTIFY and RET, to the actions, rather, it adds two new arguments, NOTIFY and RET, to the
redirect action defined in Section 4.2 of [RFC5228]. This updates redirect action defined in Section 4.2 of [RFC5228]. This updates
the usage description for redirect to: the usage description for redirect to:
Usage: redirect [:notify "value"] [:ret "FULL"|"HDRS"] Usage: redirect [:notify "value"] [:ret "FULL"|"HDRS"]
<address: string> <address: string>
skipping to change at page 10, line 36 skipping to change at page 11, line 36
message should be delivered. This parameter does not allow message should be delivered. This parameter does not allow
specification of negative values; it should not be necessary specify specification of negative values; it should not be necessary specify
such values in this context. :bytimeabsolute specifies an absolute such values in this context. :bytimeabsolute specifies an absolute
time limit on delivery. The limit in this case is specified in the time limit on delivery. The limit in this case is specified in the
restricted ISO 8601 format specified by the date-time ABN production restricted ISO 8601 format specified by the date-time ABN production
given in [RFC3339] given in [RFC3339]
:bymode specifies whether a notification should be sent or the :bymode specifies whether a notification should be sent or the
message simply returned if the time limit is exceeded. The default message simply returned if the time limit is exceeded. The default
is "return" if :bymode is not specified. :bytrace, if specified, is "return" if :bymode is not specified. :bytrace, if specified,
activiates message tracing. activates message tracing.
The semantics of delivery time limits and these parameters are The semantics of delivery time limits and these parameters are
specified and discussed at length in [RFC2852]. specified and discussed at length in [RFC2852].
It is an error to specify either :bymode or :bytrace without either It is an error to specify either :bymode or :bytrace without either
:bytimeabsolute or :bytimerelative. :bytimeabsolute or :bytimerelative.
When these arguments are specified, they are used to construct the When these arguments are specified, they are used to construct the
corresponding BY ESMTP MAIL FROM parameter. The :bytimeabsolute or corresponding BY ESMTP MAIL FROM parameter. The :bytimeabsolute or
:bytimerelative value becomes the by-time, the :bymode becomes the :bytimerelative value becomes the by-time, the :bymode becomes the
by-mode value, and :bytrace sets the by-trace modifier. If the by-mode value, and :bytrace sets the by-trace modifier. If the
deliver-by extension is unavailable, the handling of reredirected deliver-by extension is unavailable, the handling of the redirected
message MUST conform to the semantics specified in [RFC2852] section message MUST conform to the semantics specified in [RFC2852] section
4.1.4 for relaying to a server that does not support the deliver-by 4.1.4 for relaying to a server that does not support the deliver-by
SMTP extension. SMTP extension.
7.1. MAIL FROM address selection 7.1. MAIL FROM address selection
RFC 5228 does not require any particular envelope sender address be RFC 5228 does not require any particular envelope sender address be
associated with redirected messages. However, the redirect-deliverby associated with redirected messages. However, the redirect-deliverby
extension, like the redirect-dsn extension, isn't terribly useful if extension, like the redirect-dsn extension, isn't terribly useful if
the place where any delivery status notifications are sent isn't the place where any delivery status notifications are sent isn't
known. Accordingly, when :bymode is specified and the envelope known. Accordingly, when either :bytimeabsolute or :bytimerelative
sender address isn't empty, implementations MUST set the envelope is specified and the envelope sender address isn't empty,
sender address to the address of the sieve owner. implementations MUST set the envelope sender address to the address
of the sieve owner.
7.2. Example 7.2. Example
The obvious use of "redirect-deliverby" is to specify a limit on The obvious use of "redirect-deliverby" is to specify a limit on
delivery attempts for a redirected message: delivery attempts for a redirected message:
require ["copy", "redirect-deliverby"]; require ["copy", "redirect-deliverby"];
# Send a copy to my cell phone, time out after 10 minutes # Send a copy to my cell phone, time out after 10 minutes
if address "from" "user@example.com" if address "from" "user@example.com"
skipping to change at page 14, line 39 skipping to change at page 15, line 39
October 2008. October 2008.
10.2. Informative references 10.2. Informative references
[RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
4rev1", RFC 3501, March 2003. 4rev1", RFC 3501, March 2003.
[RFC3894] Degener, J., "Sieve Extension: Copying Without Side [RFC3894] Degener, J., "Sieve Extension: Copying Without Side
Effects", RFC 3894, October 2004. Effects", RFC 3894, October 2004.
[RFC5229] Homme, K., "Sieve Email Filtering: Variables Extension",
RFC 5229, January 2008.
[RFC5270] Jang, H., Jee, J., Han, Y., Park, S., and J. Cha, "Mobile
IPv6 Fast Handovers over IEEE 802.16e Networks", RFC 5270,
June 2008.
Appendix A. Acknowledgements Appendix A. Acknowledgements
Cyrus Daboo, Derek Diget, Philip Guenther, Arnt Gulbrandsen, Tero Cyrus Daboo, Derek Diget, Philip Guenther, Arnt Gulbrandsen, Tero
Kivinen, Barry Leiba, Andrew McKeon, Alexey Melnikov, Chris Newman, Kivinen, Barry Leiba, Andrew McKeon, Alexey Melnikov, Chris Newman,
Aaron Stone, and Alexandros Vellis provided helpful suggestions and Aaron Stone, and Alexandros Vellis provided helpful suggestions and
corrections. corrections.
Author's Address Author's Address
Ned Freed Ned Freed
Oracle Oracle
800 Royal Oaks 800 Royal Oaks
Monrovia, CA 91016-6347 Monrovia, CA 91016-6347
USA USA
Phone: +1 909 457 4293
Email: ned.freed@mrochek.com Email: ned.freed@mrochek.com
 End of changes. 16 change blocks. 
18 lines changed or deleted 66 lines changed or added

This html diff was produced by rfcdiff 1.38. The latest version is available from http://tools.ietf.org/tools/rfcdiff/