Network Working Group                                           N. Freed
Request for Comments: 5260                              Sun Microsystems
Category: Standards Track                                      July 2008
        
            Sieve Email Filtering: Date and Index Extensions
        

Status of This Memo

このメモのステータス

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

この文書は、インターネットコミュニティのためのインターネット標準トラックプロトコルを指定し、改善のための議論と提案を要求します。このプロトコルの標準化状態と状態への「インターネット公式プロトコル標準」(STD 1)の最新版を参照してください。このメモの配布は無制限です。

Abstract

抽象

This document describes the "date" and "index" extensions to the Sieve email filtering language. The "date" extension gives Sieve the ability to test date and time values in various ways. The "index" extension provides a means to limit header and address tests to specific instances of header fields when header fields are repeated.

この文書では、Sieveメールフィルタリング言語に「日付」と「インデックス」の拡張機能について説明します。 「日付」の拡張子は、ふるいにさまざまな方法で、日付と時刻の値をテストすることができます。 「インデックス」拡張ヘッダフィールドが繰り返されたときにヘッダフィールドの特定のインスタンスにヘッダ及びアドレス試験を制限する手段を提供します。

Table of Contents

目次

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2
   2.  Conventions Used in This Document  . . . . . . . . . . . . . .  2
   3.  Capability Identifiers . . . . . . . . . . . . . . . . . . . .  3
   4.  Date Test  . . . . . . . . . . . . . . . . . . . . . . . . . .  3
     4.1.  Zone and Originalzone Arguments  . . . . . . . . . . . . .  4
     4.2.  Date-part Argument . . . . . . . . . . . . . . . . . . . .  4
     4.3.  Comparator Interactions with Date-part Arguments . . . . .  5
     4.4.  Examples . . . . . . . . . . . . . . . . . . . . . . . . .  6
   5.  Currentdate Test . . . . . . . . . . . . . . . . . . . . . . .  6
     5.1.  Examples . . . . . . . . . . . . . . . . . . . . . . . . .  6
   6.  Index Extension  . . . . . . . . . . . . . . . . . . . . . . .  7
     6.1.  Example  . . . . . . . . . . . . . . . . . . . . . . . . .  8
   7.  Security Considerations  . . . . . . . . . . . . . . . . . . .  8
   8.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  9
   9.  References . . . . . . . . . . . . . . . . . . . . . . . . . .  9
     9.1.  Normative References . . . . . . . . . . . . . . . . . . .  9
     9.2.  Informative References . . . . . . . . . . . . . . . . . . 10
   Appendix A.  Julian Date Conversions . . . . . . . . . . . . . . . 11
   Appendix B.  Acknowledgements  . . . . . . . . . . . . . . . . . . 12
        
1. Introduction
1. はじめに

Sieve [RFC5228] is a language for filtering email messages at or around the time of final delivery. It is designed to be implementable on either a mail client or mail server. It is meant to be extensible, simple, and independent of access protocol, mail architecture, and operating system. It is suitable for running on a mail server where users may not be allowed to execute arbitrary programs, such as on black box Internet Message Access Protocol [RFC3501] servers, as it does not have user-controlled loops or the ability to run external programs.

ふるい[RFC5228]は、最終的な配達の時や周りの電子メールメッセージをフィルタリングするための言語です。メールクライアントまたはメールサーバーのいずれかで実施可能となるように設計されています。拡張可能なシンプル、かつアクセスプロトコル、メールアーキテクチャ、およびオペレーティングシステムから独立であることを意味します。それはユーザ制御ループまたは外部プログラムを実行する機能を持っていないように、それは、ユーザーがそのようなブラックボックス、インターネットメッセージアクセスプロトコル[RFC3501]のサーバ上などの任意のプログラムを実行することは許されないことがあり、メールサーバー上で実行されているに適しています。

The "date" extension provides a new date test to extract and match date/time information from structured header fields. The date test is similar in concept to the address test specified in [RFC5228], which performs similar operations on addresses in header fields.

「日付」拡張は、構造ヘッダフィールドから日付/時刻情報を抽出し、一致する新しい日付の試験を提供します。日付試験は、ヘッダフィールドのアドレスに同様の動作を行う[RFC5228]で指定されたアドレスのテスト、と概念が類似しています。

The "date" extension also provides a currentdate test that operates on the date and time when the Sieve script is executed.

「日付」の拡張もSieveスクリプトが実行されたときの日付と時刻で動作CURRENTDATEテストを提供します。

Some header fields containing date/time information, e.g., Received:, naturally occur more than once in a single header. In such cases it is useful to be able to restrict the date test to some subset of the fields that are present. For example, it may be useful to apply a date test to the last (earliest) Received: field. Additionally, it may also be useful to apply similar restrictions to either the header or address tests specified in [RFC5228].

受信例えば、日付/時刻情報を含むいくつかのヘッダフィールドは、自然に単一のヘッダに複数回発生:,。このような場合には、存在しているフィールドのサブセットに日付試験を制限することができることが有用です。フィールド:たとえば、最後の(最も古い)受信に日付のテストを適用するために有用である可能性があります。さらに、また、[RFC5228]で指定されたヘッダまたはアドレスのテストのいずれかに同様の制限を適用するために有用であり得ます。

For this reason, this specification also defines an "index" extension. This extension adds two additional tagged arguments :index and :last to the header, address, and date tests. If present, these arguments specify which occurrence of the named header field is to be tested.

このため、この仕様では、「インデックス」の拡張子を定義します。インデックスと::ヘッダ、アドレス、および日付のテストへの最後のこの拡張は、2つの追加タグ付きの引数を追加します。存在する場合、これらの引数は、試験されるべきであるという名前のヘッダフィールドのどちら発生指定します。

2. Conventions Used in This Document
この文書で使用される2.表記

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 RFC 2119 [RFC2119].

この文書のキーワード "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", および "OPTIONAL" はRFC 2119 [RFC2119]に記載されているように解釈されます。

The terms used to describe the various components of the Sieve language are taken from Section 1.1 of [RFC5228]. Section 2 of the same document describes basic Sieve language syntax and semantics. The date-time syntactic element defined using ABNF notation [RFC5234] in [RFC3339] is also used here.

ふるい言語の様々な構成要素を記述するために使用される用語は、[RFC5228]のセクション1.1から取られます。同じ文書の第2章では、基本的なふるい言語の構文と意味を説明しています。構文要素は[RFC3339]でABNF表記[RFC5234]を使用して定義された日時はまた、ここで使用されます。

3. Capability Identifiers
3.機能識別子

The capability strings associated with the two extensions defined in this document are "date" and "index".

この文書で定義された2つの拡張子に関連付けられている機能の文字列は、「日付」と「インデックス」です。

4. Date Test
4.日付テスト

Usage: date [<":zone" <time-zone: string>> / ":originalzone"] [COMPARATOR] [MATCH-TYPE] <header-name: string> <date-part: string> <key-list: string-list>

使用方法:日付[< ":ゾーン" <タイムゾーン:文字列>> / ":originalzone"] [コンパレータ] [MATCH-TYPE] <ヘッダー名:文字列> <日付部分:文字列>の<key-リスト:文字列のリスト>

The date test matches date/time information derived from headers containing [RFC2822] date-time values. The date/time information is extracted from the header, shifted to the specified time zone, and the value of the given date-part is determined. The test returns true if the resulting string matches any of the strings specified in the key-list, as controlled by the comparator and match keywords. The date test returns false unconditionally if the specified header field does not exist, the field exists but does not contain a syntactically valid date-time specification, the date-time isn't valid according to the rules of the calendar system (e.g., January 32nd, February 29 in a non-leap year), or the resulting string fails to match any key-list value.

日付試験は、[RFC2822]日時値を含むヘッダから誘導日付/時刻情報と一致します。日付/時刻情報は、ヘッダから抽出された指定された時間帯にシフトし、所定の日付部分の値が決定されます。テストは、コンパレータと一致キーワードによって制御されるように結果の文字列が、キー・リストに指定された文字列のいずれかに一致する場合はtrueを返します。日付試験は、指定されたヘッダフィールドが存在しない場合、フィールドが存在するが、構文的に有効な日付・時間指定が含まれていない、日付、時刻、カレンダーシステム(例えば1月の規則に従って有効でない無条件にfalseを返します第32回、非うるう年では2月29日)、または結果の文字列は、任意のキーリストの値と一致しません。

The type of match defaults to ":is" and the default comparator is "i;ascii-casemap".

マッチのデフォルトのタイプは、「:」であり、デフォルトのコンパレータは「I; ASCII-CASEMAP」です。

Unlike the header and address tests, the date test can only be applied to a single header field at a time. If multiple header fields with the same name are present, only the first field that is found is used. (Note, however, that this behavior can be modified with the "index" extension defined below.) These restrictions simplify the test and keep the meaning clear.

ヘッダ及びアドレス試験とは異なり、日付試験は、一度に単一のヘッダフィールドに適用することができます。同じ名前の複数のヘッダフィールドが存在する場合、検出された最初のフィールドが使用されます。 (この動作は以下に定義する「インデックス」拡張子で変更することができるということ、しかし、注意してください。)これらの制限は、テストを簡素化し、明確な意味を保ちます。

The "relational" extension [RFC5231] adds a match type called ":count". The count of a date test is 1 if the specified field exists and contains a valid date; 0, otherwise.

「:数」「関係」の拡張[RFC5231]はと呼ばれるマッチタイプを追加します。指定したフィールドが存在し、有効な日付が含まれている場合は、日付のテストの数は1です。それ以外の場合は0、。

Implementations MUST support extraction of RFC 2822 date-time information that either makes up the entire header field (e.g., as it does in a standard Date: header field) or appears at the end of a header field following a semicolon (e.g., as it does in a standard Received: header field). Implementations MAY support extraction of date and time information in RFC2822 or other formats that appears in other positions in header field content. In the case of a field containing more than one date or time value, the last one that appears SHOULD be used.

それとして、例えば(またはセミコロン次のヘッダーフィールドの最後に表示されます。実装は(ヘッダフィールドには、標準の日付の場合と同様、例えば)全体のヘッダフィールドを構成するいずれかのことをRFC 2822、日時情報の抽出をサポートしなければなりませんヘッダフィールド):受信した標準でありません。実装は、ヘッダフィールドの内容で他の位置に表示されRFC2822または他の形式の日時情報の抽出をサポートするかもしれません。複数の日付や時刻の値を含むフィールドの場合は、表示された最後のものを使用する必要があります。

4.1. Zone and Originalzone Arguments
4.1. ゾーンとOriginalzone引数

The :originalzone argument specifies that the time zone offset originally in the extracted date-time value should be retained. The :zone argument specifies a specific time zone offset that the date-time value is to be shifted to prior to testing. It is an error to specify both :zone and :originalzone.

:originalzone引数は、抽出された日時の値に元々タイムゾーンオフセットを保持する必要があることを指定します。 :ゾーン引数は、特定の時間帯には日時の値が試験前にシフトすることをオフセットを指定します。ゾーンと::originalzone両方を指定するとエラーになります。

The value of time-zone MUST be an offset relative to UTC with the following syntax:

タイムゾーンの値は、以下の構文を使用してUTCに対してオフセットしなければなりません。

time-zone = ( "+" / "-" ) 4DIGIT

タイムゾーン=( "+" / " - ")4桁

The "+" or "-" indicates whether the time-of-day is ahead of (i.e., east of) or behind (i.e., west of) UTC. The first two digits indicate the number of hours difference from Universal Time, and the last two digits indicate the number of minutes difference from Universal Time. Note that this agrees with the RFC 2822 format for time zone offsets, not the ISO 8601 format.

「+」または「 - 」の時刻が先の(即ち、東)または後ろUTC(のすなわち、西)であるかどうかを示します。最初の2桁は世界時からの時間差の数を示し、最後の2桁は世界時からの分差の数を示しています。これは、タイムゾーンオフセットのためのRFC 2822形式ではなく、ISO 8601形式と一致していることに注意してください。

If both the :zone and :originalzone arguments are omitted, the local time zone MUST be used.

ゾーンと:両方の場合はoriginalzone引数が省略され、ローカルタイムゾーンを使用しなければなりません。

4.2. Date-part Argument
4.2. 日付の部分の引数

The date-part argument specifies a particular part of the resulting date/time value to match against the key-list. Possible case-insensitive values are:

日付部分の引数には、キー・リストと照合する結果の日付/時刻値の特定の部分を指定します。可能な大文字と小文字を区別しない値は次のとおりです。

"year" => the year, "0000" .. "9999". "month" => the month, "01" .. "12". "day" => the day, "01" .. "31". "date" => the date in "yyyy-mm-dd" format. "julian" => the Modified Julian Day, that is, the date expressed as an integer number of days since 00:00 UTC on November 17, 1858 (using the Gregorian calendar). This corresponds to the regular Julian Day minus 2400000.5. Sample routines to convert to and from modified Julian dates are given in Appendix A. "hour" => the hour, "00" .. "23". "minute" => the minute, "00" .. "59". "second" => the second, "00" .. "60". "time" => the time in "hh:mm:ss" format. "iso8601" => the date and time in restricted ISO 8601 format. "std11" => the date and time in a format appropriate for use in a Date: header field [RFC2822].

"年" =>年、 "0000" .. "9999"。 "月" =>月、 "01" .. "12"。 "日" =>日、 "01" .. "31"。 "YYYY-MM-DD" 形式で "日付" =>日付。 「ジュリアン」=>修正ユリウス日、つまり、日付(グレゴリオ暦を使用して)、1858年11月17日の00:00 UTCからの日数の整数として表現しました。これは、通常のユリウス日のマイナス2400000.5に対応しています。サンプルルーチンは、付録A「時間」=>時間、「00」..「23」に与えられているにして修正ユリウス日から変換します。 "分" =>分、 "00" .. "59"。 "秒" =>第二、 "00" .. "60"。フォーマット "HH:MM:SS" の "時間" =>時間。制限されたISO 8601形式の「ISO8601」=>日付と時刻。 「std11」日付で使用するための適切なフォーマットで=>日時:ヘッダフィールド[RFC2822]。

"zone" => the time zone in use. If the user specified a time zone with ":zone", "zone" will contain that value. If :originalzone is specified this value will be the original zone specified in the date-time value. If neither argument is specified the value will be the server's default time zone in offset format "+hhmm" or "-hhmm". An offset of 0 (Zulu) always has a positive sign. "weekday" => the day of the week expressed as an integer between "0" and "6". "0" is Sunday, "1" is Monday, etc.

使用中=>タイムゾーン「ゾーン」。 「:ゾーン」ユーザーが持つ時間帯を指定した場合は、「ゾーン」という値が含まれます。場合:originalzoneが指定されている。この値は、日付時刻値で指定された元のゾーンになります。どちらの引数が指定されている場合は値がオフセット形式「+ HHMM」または「-hhmm」で、サーバのデフォルトのタイムゾーンになります。 0(ズールー)のオフセットは常に正の符号を持っています。週の「平日」=>日が「0」と「6」の間の整数で表されます。 「0」月曜日、日曜日など、「1」されています

The restricted ISO 8601 format is specified by the date-time ABNF production given in [RFC3339], Section 5.6, with the added restrictions that the letters "T" and "Z" MUST be in upper case, and a time zone offset of zero MUST be represented by "Z" and not "+00:00".

制限されたISO 8601形式は文字「T」および「Z」は大文字でなければなりません追加の制限が、[RFC3339]、セクション5.6で指定された日時ABNF生産によって指定され、タイムゾーンは、ゼロオフセットされます「Z」ではなく「:00 00」で表されなければなりません。

4.3. Comparator Interactions with Date-part Arguments
4.3. 日付の部分の引数を持つコンパレータの相互作用

Not all comparators are suitable with all date-part arguments. In general, the date-parts can be compared and tested for equality with either "i;ascii-casemap" (the default) or "i;octet", but there are two exceptions:

いないすべてのコンパレータは、すべての日付部分の引数を持つのに適しています。一般的には、日付の部分を比較することができると「I; ASCII-CASEMAP」のいずれかと等しいかどうかをテストした(デフォルト)または「I;オクテット」が、2つの例外があります。

julian This is an integer, and may or may not have leading zeros. As such, "i;ascii-numeric" is almost certainly the best comparator to use with it.

ジュリアンこれは整数であり、又は先行ゼロを有していてもいなくてもよいです。そのように、「私は、アスキーの数値は」ほぼ確実にそれを使用するのに最適なコンパレータです。

std11 This is provided as a means to obtain date/time values in a format appropriate for inclusion in email header fields. The wide range of possible syntaxes for a std11 date/time -- which implementations of this extension are free to use when composing a std11 string -- makes this format a poor choice for comparisons. Nevertheless, if a comparison must be performed, this is case-insensitive, and therefore "i;ascii-casemap" needs to be used.

std11これは、電子メールのヘッダーフィールドに含めるために適切な形式の日付/時刻値を得るための手段として設けられています。この拡張機能の実装はstd11文字列を構成するときに使用するのは自由です - - std11の日付/時間の可能な構文の広い範囲が、この形式の比較のために貧しい選択肢となります。比較が行われなければならない場合にもかかわらず、これは大文字と小文字を区別しないで、したがって、「私は、ASCII-CASEMAP」を使用する必要があります。

"year", "month", "day", "hour", "minute", "second" and "weekday" all use fixed-width string representations of integers, and can therefore be compared with "i;octet", "i;ascii-casemap", and "i;ascii-numeric" with equivalent results.

「年」、「月」、「日」、「第二」「時」、「分」、および「平日は」すべてが整数の固定幅の文字列表現を使用し、そのために比較することができ、「I;オクテット」、 " I;アスキー・CASEMAP」、および "私、同等の結果と" ASCII数値。

"date" and "time" also use fixed-width string representations of integers, and can therefore be compared with "i;octet" and "i;ascii-casemap"; however, "i;ascii-numeric" can't be used with it, as "i;ascii-numeric" doesn't allow for non-digit characters.

「日付」と「時間」はまた整数の固定幅の文字列表現を使用し、したがって、「I;オクテット」と比較することができ、「I; ASCII-CASEMAP」。しかし、「I; ASCII数字」として、それを使用することはできません「I; ASCII数字」数字以外の文字を許可しません。

4.4. Examples
4.4. 例

The Date: field can be checked to test when the sender claims to have created the message and act accordingly:

日付:フィールドは、送信者の主張がメッセージを作成し、それに応じて行動しているとするときテストするためにチェックすることができます。

require ["date", "relational", "fileinto"]; if allof(header :is "from" "boss@example.com", date :value "ge" :originalzone "date" "hour" "09", date :value "lt" :originalzone "date" "hour" "17") { fileinto "urgent"; }

[ "日付"、 "リレーショナル"、 "のfileinto"]が必要です。 ALLOF(ヘッダ場合:boss@example.com " "から" ある"、日付:値 "GE":originalzone "日" "時間" "09"、日付:値 "LT":originalzone "日" "時間"「 17" ){のfileinto "" 緊急。 }

Testing the initial Received: field can provide an indication of when a message was actually received by the local system:

初期受信テスト:フィールドは、メッセージが実際にローカル・システムによって受信されたときの表示を提供することができます。

require ["date", "relational", "fileinto"]; if anyof(date :is "received" "weekday" "0", date :is "received" "weekday" "6") { fileinto "weekend"; }

[ "日付"、 "リレーショナル"、 "のfileinto"]が必要です。 ( "平日" "0" "受信" され、日付:曜日 " "6"" "受信" される日付){ "週末" のfileinto; anyof場合}

5. Currentdate Test
5. CURRENTDATEテスト

Usage: currentdate [":zone" <time-zone: string>] [COMPARATOR] [MATCH-TYPE] <date-part: string> <key-list: string-list>

使用方法:CURRENTDATE [ ":ゾーン" <タイムゾーン:文字列>] [コンパレータ] [MATCH-TYPE] <日付部分:文字列>の<key-リスト:文字列のリスト>

The currentdate test is similar to the date test, except that it operates on the current date/time rather than a value extracted from the message header. In particular, the ":zone" and date-part arguments are the same as those in the date test.

CURRENTDATE試験は、現在の日付/時刻ではなく、メッセージヘッダから抽出された値で動作することを除いて、日付の試験と同様です。具体的には、「:ゾーン」と日付部の引数が日付試験と同様です。

All currentdate tests in a single Sieve script MUST refer to the same point in time during execution of the script.

単一SieveスクリプトのすべてのCURRENTDATEテストは、スクリプトの実行中に同じ時点を参照する必要があります。

The :count value of a currentdate test is always 1.

:CURRENTDATEテストのカウント値は常に1です。

5.1. Examples
5.1. 例

The simplest use of currentdate is to have an action that only operates at certain times. For example, a user might want to have messages redirected to their pager after business hours and on weekends:

CURRENTDATEの最も簡単な使用は、特定の時間帯で動作作用を有することがあります。例えば、ユーザは営業時間後や週末に自分のポケットベルにリダイレクトメッセージを持っている場合があります:

require ["date", "relational"]; if anyof(currentdate :is "weekday" "0", currentdate :is "weekday" "6", currentdate :value "lt" "hour" "09", currentdate :value "ge" "hour" "17") { redirect "pager@example.com"; }

[「日付」、「関係」を]が必要です。 {anyof(値 "GE" "時間" "17" "曜日" "0:値 "LT" "時間" "09"、CURRENTDATE:平日" が "6"、CURRENTDATE "CURRENTDATEは" CURRENTDATE)場合リダイレクト「pager@example.com」。 }

Currentdate can be used to set up vacation [RFC5230] responses in advance and to stop response generation automatically:

CURRENTDATEは、事前に休暇[RFC5230]応答を設定すると、自動的に応答生成を停止するために使用することができます。

require ["date", "relational", "vacation"]; if allof(currentdate :value "ge" "date" "2007-06-30", currentdate :value "le" "date" "2007-07-07") { vacation :days 7 "I'm away during the first week in July."; }

[「日付」、「リレーショナル」、「休暇」]が必要です。もしALLOF(CURRENTDATE:値「GE」「日付」「2007-06-30」、CURRENTDATE:値「ル」「日」「2007年7月7日」){休暇:日7「私は最初の時に離れてよ7月の週」。 }

Currentdate may also be used in conjunction with the variables extension to pass time-dependent arguments to other tests and actions. The following Sieve places messages in a folder named according to the current month and year:

CURRENTDATEは、他のテストやアクションに時間依存の引数を渡すために、変数の拡張機能と組み合わせて使用​​することができます。以下のふるいは、現在の月と年に応じてという名前のフォルダ内のメッセージを配置します

     require ["date", "variables", "fileinto"];
     if currentdate :matches "month" "*" { set "month" "${1}"; }
     if currentdate :matches "year"  "*" { set "year"  "${1}"; }
     fileinto "${month}-${year}";
        

Finally, currentdate can be used in conjunction with the editheader extension to insert a header-field containing date/time information:

最後に、CURRENTDATEは、日付/時刻情報を含むヘッダフィールドを挿入するeditheader拡張と併せて使用することができます。

require ["variables", "date", "editheader"]; if currentdate :matches "std11" "*" {addheader "Processing-date" "${0}";}

[ "変数"、 "日付"、 "editheader"]が必要です。もしCURRENTDATE:マッチ "std11" "*" {はaddheader "処理日付" "$ {0}";}

6. Index Extension
6.索引の拡張

The "index" extension, if specified, adds optional :index and :last arguments to the header, address, and date tests as follows:

次のように最後のヘッダへの引数、アドレス、および日付のテスト:インデックスと:「インデックス」の拡張子は、指定された場合には、オプションを追加します。

Syntax: date [":index" <fieldno: number> [":last"]] [<":zone" <time-zone: string>> / ":originalzone"] [COMPARATOR] [MATCH-TYPE] <header-name: string> <date-part: string> <key-list: string-list>

構文:日付[ "インデックス" <fieldno:番号> "最後"] [< ":ゾーン" <タイムゾーン:文字列>> / ":originalzone"] [コンパレータ] [MATCH-TYPE] <ヘッダ-name:文字列> <日付部分:文字列>の<key-リスト:文字列のリスト>

Syntax: header [":index" <fieldno: number> [":last"]] [COMPARATOR] [MATCH-TYPE] <header-names: string-list> <key-list: string-list>

構文:ヘッダ[ "インデックス" <fieldno:番号> "最後"]] [コンパレータ] [MATCH-TYPE <ヘッダー名:文字列リスト> <キーリスト:文字列リスト>

Syntax: address [":index" <fieldno: number> [":last"]] [ADDRESS-PART] [COMPARATOR] [MATCH-TYPE] <header-list: string-list> <key-list: string-list>

構文:アドレス[ "インデックス" <fieldno:番号> "最後"] [ADDRESS-PART] [コンパレータ] [MATCH-TYPE <ヘッダリスト:文字列リスト> <キーリスト:文字列リスト>

If :index <fieldno> is specified, the attempts to match a value are limited to the header field fieldno (beginning at 1, the first named header field). If :last is also specified, the count is backwards; 1 denotes the last named header field, 2 the second to last, and so on. Specifying :last without :index is an error.

場合:インデックス<fieldno>が指定され、値が一致する試みは、ヘッダフィールドfieldno(1から始まる、第一というヘッダ・フィールド)に限られています。場合:最後にも指定され、カウントは後方です。図1は、これの最後の名前のヘッダフィールドは、最後には2秒であり、。指定:最後なし:インデックスとエラーになります。

:index only counts separate header fields, not multiple occurrences within a single field. In particular, :index cannot be used to test a specific address in an address list contained within a single header field.

:インデックスは、別のヘッダーフィールドではなく、単一のフィールド内の複数のオカレンスをカウントします。特に、:インデックスは、単一のヘッダフィールド内に含まれるアドレスのリスト内の特定のアドレスをテストするために使用することができません。

Both header and address allow the specification of more than one header field name. If more than one header field name is specified, all the named header fields are counted in the order specified by the header-list.

ヘッダ及びアドレスの両方は、複数のヘッダーフィールド名の指定を可能にします。複数のヘッダフィールド名が指定されている場合は、すべての名前のヘッダフィールドは、ヘッダ・リストで指定された順番にカウントされます。

6.1. Example
6.1. 例

Mail delivery may involve multiple hops, resulting in the Received: field containing information about when a message first entered the local administrative domain being the second or subsequent field in the message. As long as the field offset is consistent, it can be tested:

メッセージが最初のメッセージに目以降のフィールドであるローカル管理ドメインに入った時に関する情報を含むフィールド:メール配信受付その結果、複数のホップを含んでもよいです。限りオフセットフィールドが一貫しているとして、それを試験することができます。

# Implement the Internet-Draft cutoff date check assuming the # second Received: field specifies when the message first # entered the local email infrastructure. require ["date", "relational", "index"]; if date :value "gt" :index 2 :zone "-0500" "received" "iso8601" "2007-02-26T09:00:00-05:00", { redirect "aftercutoff@example.org"; }

#第2の受信#を想定したインターネットドラフトカットオフ日付チェックを実装します。メッセージ最初の#はローカル電子メールインフラストラクチャに入ったとき、フィールドを指定します。 [「日付」、「リレーショナル」、「インデックス」]が必要です。値 "GT":インデックス2:ゾーン "-0500" "受信" "ISO8601" "2007-02-26T09:00:00-05:00 aftercutoff@example.org" を "{リダイレクト";日があれば}

7. Security Considerations
7.セキュリティの考慮事項

The facilities defined here, like the facilities in the base Sieve specification, operate on message header information that can easily be forged. Note, however, that some fields are inherently more reliable than others. For example, the Date: field is typically inserted by the message sender and can be altered at any point. By contrast, the uppermost Received: field is typically inserted by the local mail system and is therefore difficult for the sender or an intermediary to falsify.

ここで定義された施設は、ベースふるい仕様の設備と同様に、容易に偽造することができるメッセージのヘッダ情報を操作します。いくつかのフィールドが他よりも本質的に信頼性があること、しかし、注意してください。例えば、日付:フィールドは、典型的には、メッセージ送信者によって挿入され、任意の時点で変更することができます。これとは対照的に、最上位の受信:フィールドは、通常、ローカルのメールシステムによって挿入され、したがって、送信者または改ざんする仲介のために困難です。

Use of the currentdate test makes script behavior inherently less predictable and harder to analyze. This may have consequences for systems that use script analysis to try and spot problematic scripts.

CURRENTDATEテストを使用すると、スクリプトの動作は、本質的により予測し、分析が難しくなります。これは試してみて、問題のあるスクリプトを発見するスクリプト解析を使用するシステムのための結果をもたらす可能性があります。

All of the security considerations given in the base Sieve specification also apply to these extensions.

基本ふるい仕様で与えられたセキュリティ上の考慮事項のすべては、これらの拡張機能に適用されます。

8. IANA Considerations
8. IANAの考慮事項

The following templates specify the IANA registrations of the two Sieve extensions specified in this document:

以下のテンプレートは、この文書で指定された2つのふるいの拡張のIANA登録を指定します。

To: iana@iana.org Subject: Registration of new Sieve extensions

To:iana@iana.org件名:新しいふるい拡張子の登録

Capability name: date Description: The "date" extension gives Sieve the ability to test date and time values. RFC number: RFC 5260 Contact address: Sieve discussion list <ietf-mta-filters@imc.org>

能力名:日付説明:「日」の拡張子がふるいに日付と時刻の値をテストすることができます。 RFC番号:RFC 5260連絡先アドレス:ふるいディスカッションリスト<ietf-mta-filters@imc.org>

Capability name: index Description: The "index" extension provides a means to limit header and address tests to specific instances when more than one field of a given type is present. RFC number: RFC 5260 Contact address: Sieve discussion list <ietf-mta-filters@imc.org>

機能名:インデックス説明:「インデックス」拡張子が与えられたタイプの複数のフィールドが存在する場合、特定のインスタンスにヘッダ及びアドレス試験を制限する手段を提供します。 RFC番号:RFC 5260連絡先アドレス:ふるいディスカッションリスト<ietf-mta-filters@imc.org>

9. References
9.参考文献
9.1. Normative References
9.1. 引用規格

[CALGO199] Tantzen, R., "Algorithm 199: Conversions Between Calendar Date and Julian Day Number", Collected Algorithms from CACM 199.

[CALGO199] Tantzen、R.、 "アルゴリズム199:カレンダーの日付とユリウス日の数との間の変換"、CACM 199から収集されたアルゴリズム。

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]ブラドナーの、S.、 "要件レベルを示すためにRFCsにおける使用のためのキーワード"、BCP 14、RFC 2119、1997年3月。

[RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April 2001.

[RFC2822]レズニック、P.、 "インターネットメッセージ形式"、RFC 2822、2001年4月。

[RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, July 2002.

[RFC3339] Klyne、G.、エド。そして、C.ニューマン、「インターネット上の日付と時刻:タイムスタンプ」、RFC 3339、2002年7月。

[RFC5228] Guenther, P. and T. Showalter, "Sieve: An Email Filtering Language", RFC 5228, January 2008.

[RFC5228]ギュンター、P.およびT.ショーウォルター監督、 "ふるい:メールフィルタリング言語"、RFC 5228、2008年1月。

[RFC5231] Segmuller, W. and B. Leiba, "Sieve Email Filtering: Relational Extension", RFC 5231, January 2008.

[RFC5231] Segmuller、W.及びB. Leiba、 "ふるいメールフィルタリング:リレーショナル拡張"、RFC 5231、2008年1月。

[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008.

[RFC5234]クロッカー、D.、およびP. Overell、 "構文仕様のための増大しているBNF:ABNF"、STD 68、RFC 5234、2008年1月。

9.2. Informative References
9.2. 参考文献

[RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, March 2003.

[RFC3501]のCrispin、M.、 "インターネットメッセージアクセスプロトコル - VERSION 4rev1"、RFC 3501、2003年3月。

[RFC5230] Showalter, T. and N. Freed, "Sieve Email Filtering: Vacation Extension", RFC 5230, January 2008.

[RFC5230]ショーウォルター監督、T.およびN.フリード、 "ふるいメールフィルタリング:休暇延長"、RFC 5230、2008年1月。

Appendix A. Julian Date Conversions

付録A.ユリウス日の変換

The following C routines show how to translate day/month/year information to and from modified Julian dates. These routines are straightforward translations of the Algol routines specified in CACM Algorithm 199 [CALGO199].

次のCルーチンは、修正ユリウスにしてから、日/月/年の情報を変換する方法を示しさかのぼります。これらのルーチンは、CACMアルゴリズム199 [CALGO199]で指定アルゴルルーチンの簡単な訳です。

Given the day, month, and year, jday returns the modified Julian date.

日、月、年を考えると、jdayは修正ユリウス暦の日付を返します。

int jday(int year, int month, int day) { int j, c, ya;

int型jday(int型年、int型の月、int型日){int型J、C、屋。

       if (month > 2)
           month -= 3;
       else
       {
           month += 9;
           year--;
       }
       c = year / 100;
       ya = year - c * 100;
       return (c * 146097 / 4 + ya * 1461 / 4 + (month * 153 + 2) / 5 +
               day + 1721119);
   }
        

Given j, the modified Julian date, jdate returns the day, month, and year.

J、修正ユリウス日を考えると、JDATEは日、月、年を返します。

void jdate(int j, int *year, int *month, int *day) { int y, m, d;

無効JDATE(int型J、int型*年、int型*月、INT *日){int型のY、M、D;

       j -= 1721119;
       y = (j * 4 - 1) / 146097;
       j = j * 4 - y * 146097 - 1;
       d = j / 4;
       j = (d * 4 + 3) / 1461;
       d = d * 4 - j * 1461 + 3;
       d = (d + 4) / 4;
       m = (d * 5 - 3) / 153;
       d = d * 5 - m * 153 - 3;
       *day = (d + 5) / 5;
       *year = y * 100 + j;
       if (m < 10)
           *month = m + 3;
       else
       {
           *month = m - 9;
           *year += 1;
       }
   }
        

Appendix B. Acknowledgements

付録B.謝辞

Dave Cridland contributed the text describing the proper comparators to use with different date-parts. Cyrus Daboo, Frank Ellerman, Alexey Melnikov, Chris Newman, Dilyan Palauzov, and Aaron Stone provided helpful suggestions and corrections.

デイブCridlandは異なる日付の部分で使用するために適切なコンパレータを説明するテキストを寄付しました。サイラスDaboo、フランクEllerman、アレクセイ・メルニコフ、クリス・ニューマン、Dilyan Palauzov、とアーロン・ストーンは、有益な提案や修正を提供しました。

Author's Address

著者のアドレス

Ned Freed Sun Microsystems 800 Royal Oaks Monrovia, CA 91016-6347 USA

ネッドフリードSun Microsystemsの800ロイヤルオークスモンロビア、カリフォルニア州91016から6347 USA

Phone: +1 909 457 4293 EMail: ned.freed@mrochek.com

電話:+1 909 457 4293 Eメール:ned.freed@mrochek.com

Full Copyright Statement

完全な著作権声明

Copyright (C) The IETF Trust (2008).

著作権(C)IETFトラスト(2008)。

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

この文書では、BCP 78に含まれる権利と許可と制限の適用を受けており、その中の記載を除いて、作者は彼らのすべての権利を保有します。

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

この文書とここに含まれている情報は、基礎とCONTRIBUTOR「そのまま」、ORGANIZATION HE / SHEが表すまたはインターネットSOCIETY、(もしあれば)を後援し、IETF TRUST ANDインターネットエンジニアリングタスクフォース放棄ALLに設けられています。保証は、明示または黙示、この情報の利用および特定目的に対する権利または商品性または適合性の黙示の保証を侵害しない任意の保証がこれらに限定されません。

Intellectual Property

知的財産

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

IETFは、本書またはそのような権限下で、ライセンスがたりないかもしれない程度に記載された技術の実装や使用に関係すると主張される可能性があります任意の知的財産権やその他の権利の有効性または範囲に関していかなる位置を取りません利用可能です。またそれは、それがどのような権利を確認する独自の取り組みを行ったことを示すものでもありません。 RFC文書の権利に関する手続きの情報は、BCP 78およびBCP 79に記載されています。

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

IPRの開示のコピーが利用できるようにIETF事務局とライセンスの保証に行われた、または本仕様の実装者または利用者がそのような所有権の使用のための一般的なライセンスまたは許可を取得するために作られた試みの結果を得ることができますhttp://www.ietf.org/iprのIETFのオンラインIPRリポジトリから。

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.

IETFは、その注意にこの標準を実装するために必要とされる技術をカバーすることができる任意の著作権、特許または特許出願、またはその他の所有権を持ってすべての利害関係者を招待します。 ietf-ipr@ietf.orgのIETFに情報を記述してください。