draft-ietf-sieve-refuse-reject-02.txt   draft-ietf-sieve-refuse-reject-03.txt 
Internet Draft M. Elvey Internet Draft M. Elvey
Document: draft-ietf-sieve-refuse-reject-02 The Elvey Partnership, Document: draft-ietf-sieve-refuse-reject-03 The Elvey Partnership,
LLC LLC
Expires: December 2006 A. Melnikov Expires: December 2006 A. Melnikov
Isode Ltd Isode Ltd
The SIEVE mail filtering language - reject extension The SIEVE mail filtering language - reject extension
draft-ietf-sieve-refuse-reject draft-ietf-sieve-refuse-reject-03.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 line 136 skipping to change at line 136
The "reject" action cancels the implicit keep and refuses delivery The "reject" action cancels the implicit keep and refuses delivery
of a message. The reason string is a UTF-8 [UTF-8] string of a message. The reason string is a UTF-8 [UTF-8] string
specifying the reason for refusal. How message is refused depends specifying the reason for refusal. How message is refused depends
on capabilities of mail component (MUA, MDA or MTA) executing the on capabilities of mail component (MUA, MDA or MTA) executing the
Sieve script. The Sieve interpreter must do one of the following Sieve script. The Sieve interpreter must do one of the following
actions, as detailed by the following priority table (items listed actions, as detailed by the following priority table (items listed
earlier take precedence). Note that if action can not be taken or earlier take precedence). Note that if action can not be taken or
fails, the interpreter should try the next item in the list: fails, the interpreter should try the next item in the list:
1. If message return-path (MAIL FROM) is empty the message SHOULD be 1. If message return-path (MAIL FROM) is empty the message SHOULD
accepted and discarded. be accepted and discarded.
2. If a "reject" implementation performs a return-path verification 2. If a "reject" implementation performs a return-path verification
and it clearly indicates that the message has a forged return-path, and it clearly indicates that the message has a forged return-path,
the implementation need not refuse mail delivery, but rather MAY the implementation need not refuse mail delivery, but rather MAY
accept and discard it. accept and discard it.
3. Message delivery is refused by sending 5XX response code over 3. Message delivery is refused by sending 5XX response code over
SMTP [SMTP] or LMTP [LMTP]. See section 3.1.1 for more details. SMTP [SMTP] or LMTP [LMTP]. See section 3.1.1 for more details.
4. Message delivery is refused by sending a non delivery report 4. Message delivery is refused by sending a non delivery report
(DSN [DSN]). See section 3.1.2 for more details. (DSN [DSN]). See section 3.1.2 for more details.
5. Message delivery is refused by sending a message disposition 5. Message delivery is refused by sending a message disposition
notification report (MDN). See section 3.1.3 for more details. notification report (MDN). See section 3.1.3 for more details.
3.1.1 Rejecting messages at SMTP/LMTP protocol level 3.1.1 Rejecting messages at SMTP/LMTP protocol level
Sieve implementations that are able to reject messages at SMTP/LMTP Sieve implementations that are able to reject messages at SMTP/LMTP
level SHOULD use the 550 response code. Note that if a message is level SHOULD use the 550 response code. Note that if a message is
arriving over SMTP and has multiple recipients, some of which have arriving over SMTP and has multiple recipients, some of which have
accepted the message, or the Sieve implementation is part of an accepted the message, or the Sieve implementation is part of an
MUA, section 3.1.2 and section 3.1.3 define how to reject such a MUA, section 3.1.2 and section 3.1.3 define how to reject such a
message. message.
<<Open issue: do we want to allow for non-ascii text below and do
we need a way to control "reject with DSN containing non-ascii
text" vs. "replace non-ascii characters with ?">>
Note that SMTP [SMTP] doesn't allow for non-ASCII characters in Note that SMTP [SMTP] doesn't allow for non-ASCII characters in
SMTP response text. If non-ASCII characters appear in the "reason" SMTP response text. If non-ASCII characters appear in the "reason"
string, they may be sent if and only if the client and the server string, they can be sent if and only if the client and the server
use an SMTP extension that allows for transmission of non-ASCII use an SMTP extension that allows for transmission of non-ASCII
reply text. Otherwise, the implementation should either consider it reply text. (One example of such SMTP extension is described in
an error, or accept the message and generate DSN as described in [UTF8-RESP].) In the absence of such SMTP extension, Sieve engine
section 3.1.2. MUST replace any reason string containing non-ASCII characters
with an implementation defined ASCII-only string. Implementations
SHOULD notify user that such replacement took place.
Users that don't like this behavior should consider using
"reject :exacttext" as described in Section 3.2, if available.
If the "reason" string is multiline, than the reason text MUST be If the "reason" string consist of multiple CRLF separated lines,
than the reason text MUST be
returned as a multiline SMTP/LMTP response, per [SMTP], section returned as a multiline SMTP/LMTP response, per [SMTP], section
4.2.1. Any line MUST NOT exceed the SMTP limit on the maximal line 4.2.1. Any line MUST NOT exceed the SMTP limit on the maximal line
length. To make the reason string conform to any such limits the length. To make the reason string conform to any such limits the
server MAY insert CRLFs and turn the response into a multiline server MAY insert CRLFs and turn the response into a multiline
response. response.
In the following script (which assumes support for the spamtest In the following script (which assumes support for the spamtest
[SPAMTEST] and fileinto extensions), messages that test highly [SPAMTEST] and fileinto extensions), messages that test highly
positive for spam are refused. positive for spam are refused.
Example: Example:
require ["reject", "spamtest", require ["reject", "spamtest",
"comparator-i;ascii-numeric", "fileinto"]; "comparator-i;ascii-numeric", "fileinto"];
if spamtest :value "ge" :comparator "i;ascii-numeric" "6" { if spamtest :value "ge" :comparator "i;ascii-numeric" "6" {
refuse text: reject text:
AntiSpam engine thinks your message is spam. AntiSpam engine thinks your message is spam.
It is therefore being refused. It is therefore being refused.
Please call 1-900-PAY-US if you want to reach us. Please call 1-900-PAY-US if you want to reach us.
. .
; ;
} elsif spamtest :value "ge" :comparator "i;ascii-numeric" "4" { } elsif spamtest :value "ge" :comparator "i;ascii-numeric" "4" {
fileinto "Suspect"; fileinto "Suspect";
} }
The following excerpt from an SMTP session shows it in action. The following excerpt from an SMTP session shows it in action.
skipping to change at line 280 skipping to change at line 282
given was as follows: given was as follows:
I am not taking mail from you, and I don't want your birdseed, I am not taking mail from you, and I don't want your birdseed,
either! either!
------------------------------------------------------------ ------------------------------------------------------------
The MDN action-value field as defined in the MDN specification MUST The MDN action-value field as defined in the MDN specification MUST
be "deleted" and MUST have the MDN-sent-automatically and automatic- be "deleted" and MUST have the MDN-sent-automatically and automatic-
action modes set. action modes set.
3.2 "reject" compatibility with other actions 3.2 :exacttext optional argument to reject action
SIEVE implementations that implement the :exacttext optional argument
to the "reject" action must advertise "rejectexact" capability in
addition to the "reject" capability described above.
The :exacttext argument affects how reject processing described in
section 3.1.1 is performed. When this argument is present, SMTP
client and server don't support an SMTP extension that allows for
transmission of non-ASCII reply text and there is non-ASCII text
in the reason string, then the reason string MUST NOT be replaced
with an implementation defined ASCII-only string as defined in 3.1.1.
Instead, Sieve engine MUST try to generate DSN, in order to preserve
the exact text specified in the reason string.
Example:
require ["reject", "rejectexact];
if size :over 100K {
reject :exacttext text:
Your message is to big. If you want to send me a big attachement,
put it on a public web site and send me an URL.
.
;
}
<<Pretend that the reason string above contains some non-ASCII text>>
NOTE: The :exacttext optional argument doesn't affect reject, if
Sieve engine is running in MUA, or if Sieve engine is running in
MTA/MDA, but it also supports an SMTP/LMTP extension for sending
UTF-8 responses.
3.3 "reject" compatibility with other actions
A "reject" action cancels the implicit keep. A "reject" action cancels the implicit keep.
Implementations MUST prohibit the execution of more than one reject Implementations MUST prohibit the execution of more than one reject
in a SIEVE script. "Reject" is also incompatible with the in a SIEVE script. "Reject" is also incompatible with the
"vacation" [VACATION] extensions. Implementations SHOULD prohibit "vacation" [VACATION] extensions.
reject when used with other actions, in particular "reject" SHOULD
be incompatible with keep, fileinto, redirect and discard. Implementations MUST prohibit the execution of more than one reject
in a SIEVE script. "Reject" MUST be incompatible with the "vacation"
[VACATION] action. Implementations SHOULD prohibit the use of
"reject" with actions that cause mail delivery, such as "keep",
"fileinto", "redirect". <<What about discard?>>
Making "reject" compatible with actions that cause mail delivery
violates RFC 2821 principal that a message is either deliver or
bounced back to the sender. So bouncing message back (rejecting)
and delivering it will make the sender believe that the message was
not delivered.
However there are existing laws requiring certain organizations to
archive all received messages, even the rejected ones. Also, it can be
quite convenient to save copies of rejected messages for later
analysis.
Any action that would modify the message body will not have effect Any action that would modify the message body will not have effect
on the body of any message refused by "reject" using the 550 SMTP on the body of any message refused by "reject" using the 550 SMTP
response code and MUST NOT have any effect on context of generated response code and MUST NOT have any effect on context of generated
DSN/MDNs. DSN/MDNs.
4. Security Considerations 4. Security Considerations
The Introduction section talks about why rejecting messages before The Introduction section talks about why rejecting messages before
delivery is better then accepting and bouncing them. delivery is better then accepting and bouncing them.
skipping to change at line 327 skipping to change at line 375
extension to point to this document. extension to point to this document.
IANA is also requested to update Tim Showalter's email address to IANA is also requested to update Tim Showalter's email address to
be be
tjs@psaux.com tjs@psaux.com
5.2 refuse extension registration 5.2 refuse extension registration
IANA is requested to remove registration of the refuse extension. IANA is requested to remove registration of the refuse extension.
<<Should this be taken care of by talking directly to IANA?>> <<Should this be taken care of by talking directly to IANA?>>
5.3 rejectexact extension registration
IANA is requested to add the following registration to the list of
Sieve extensions:
Capability name: rejectexact
Description: adds the ':exacttext' optional argument to the
reject action, which instructs Sieve engine to
generate Delivery Status Notifications if rejection
reason string contains non-ASCII text.
RFC number: this RFC (Sieve base spec)
Contact address: The Sieve discussion list <ietf-mta-filters@imc.org>
6. References 6. References
6.1 Normative References 6.1 Normative References
[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.
[SIEVE] Showalter, T. and P. Guenther, "Sieve: An Email Filtering [SIEVE] Showalter, T. and P. Guenther, "Sieve: An Email Filtering
Language", Work-in-progress, draft-ietf-sieve-3028bis-XX.txt Language", Work-in-progress, draft-ietf-sieve-3028bis-XX.txt
skipping to change at line 375 skipping to change at line 436
[SPAMTEST] Daboo, C., "SIEVE Email Filtering: Spamtest and [SPAMTEST] Daboo, C., "SIEVE Email Filtering: Spamtest and
Virustest Extensions", work in progress, draft-ietf-sieve- Virustest Extensions", work in progress, draft-ietf-sieve-
spamtestbis-XX.txt spamtestbis-XX.txt
<<Note to the RFC editor: this reference can be safely replaced <<Note to the RFC editor: this reference can be safely replaced
with RFC 3685.>> with RFC 3685.>>
[RFC3834] Moore, K., "Recommendations for Automatic Responses to [RFC3834] Moore, K., "Recommendations for Automatic Responses to
Electronic Mail", RFC 3834, August 2004. Electronic Mail", RFC 3834, August 2004.
[UTF8-RESP] A. Melnikov (Ed.), "SMTP Language Extension",
work in progress, draft-melnikov-smtp-lang-XX.txt
7. Acknowledgments 7. Acknowledgments
Thanks to Ned Freed, Cyrus Daboo, Arnt Gulbrandsen, Kristin Hubner, Thanks to Ned Freed, Cyrus Daboo, Arnt Gulbrandsen, Kristin Hubner,
Mark E. Mallett, Philip Guenther and Michael Haardt for comments Mark E. Mallett, Philip Guenther and Michael Haardt for comments
and corrections. and corrections.
The authors gratefully acknowledge the extensive work of Tim The authors gratefully acknowledge the extensive work of Tim
Showalter as the author of the RFC 3028, which originally defined Showalter as the author of the RFC 3028, which originally defined
the "reject" action. the "reject" action.
skipping to change at line 469 skipping to change at line 533
publication.>> publication.>>
00 First formal draft. 00 First formal draft.
01 Explicit RFC 2034 support, disallow "refuse" in MUAs, typos 01 Explicit RFC 2034 support, disallow "refuse" in MUAs, typos
corrected, clarifications, etc. corrected, clarifications, etc.
02 Many insubstantial editorial changes (mostly rewording text for 02 Many insubstantial editorial changes (mostly rewording text for
readability). Added text regarding non-ASCII characters in the refuse readability). Added text regarding non-ASCII characters in the refuse
"reason" string. Added an exception allowing return-path forgery to "reason" string. Added an exception allowing return-path forgery to
justify discarding a message. justify discarding a message.
03 (Renamed to be SIEVE WG 00) - Updated boilerplate, added reject 03 (Renamed to be SIEVE WG 00) - Updated boilerplate, added reject
action from the base spec, acknowledged Tim as the author of "reject". action from the base spec, acknowledged Tim as the author of
"reject".
04 (SIEVE WG 01) Based on WGLC feedback, the refuse and the reject 04 (SIEVE WG 01) Based on WGLC feedback, the refuse and the reject
actions were merged into a single action called reject. Text actions were merged into a single action called reject. Text
reorganized as the result. Typos and examples corrected. Updated IANA reorganized as the result. Typos and examples corrected. Updated
registration and Security Considerations sections. IANA registration and Security Considerations sections.
05 (SIEVE WG 02) Copied some security considerations from Vacation 05 (SIEVE WG 02) Copied some security considerations from Vacation
draft. Clarified that the "reason" string is in UTF-8. Clarified draft. Clarified that the "reason" string is in UTF-8. Clarified
interaction with "editheader" extension. Added text about sending of interaction with "editheader" extension. Added text about sending
4XX instead of 550. Corrected typos in several examples. of 4XX instead of 550. Corrected typos in several examples.
06 (SIEVE WG 03) Explicitly list all actions incompable with reject.
Added two paragraphs explaining why reject SHOULD (as opposed to
MUST/MAY) be incompatible with them. Clarified that if the reason
string contains non-ASCII and rejection over protocol is possible,
then the reason string MUST be replaced with an implementations
defined ASCII-only string. Added :exacttext optional argument that
preserves UTF-8 reason string by forcing generation of DSN.
 End of changes. 15 change blocks. 
20 lines changed or deleted 85 lines changed or added

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