⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc3028.txt

📁 本程序为在linux下实现FTP传输文件的实现
💻 TXT
📖 第 1 页 / 共 4 页
字号:
   identifier = (ALPHA / "_") *(ALPHA DIGIT "_")

   tag = ":" identifier

   number = 1*DIGIT [QUANTIFIER]

   QUANTIFIER = "K" / "M" / "G"

   quoted-string = DQUOTE *CHAR DQUOTE
           ;; in general, \ CHAR inside a string maps to CHAR
           ;; so \" maps to " and \\ maps to \
           ;; note that newlines and other characters are all allowed
           ;; strings

   multi-line          = "text:" *(SP / HTAB) (hash-comment / CRLF)
                         *(multi-line-literal / multi-line-dotstuff)
                         "." CRLF
   multi-line-literal  = [CHAR-NOT-DOT *CHAR-NOT-CRLF] CRLF
   multi-line-dotstuff = "." 1*CHAR-NOT-CRLF CRLF
           ;; A line containing only "." ends the multi-line.
           ;; Remove a leading '.' if followed by another '.'.

   white-space = 1*(SP / CRLF / HTAB) / comment

8.2.  语法
滤网描述语言进行词法分析后采用如下的语法结构,以下的陈述都不涉及空白字符或者
注释成分,开始符号是“start”。
   argument = string-list / number / tag

   arguments = *argument [test / test-list]

   block = "{" commands "}"

   command = identifier arguments ( ";" / block )

   commands = *command

   start = commands

   string = quoted-string / multi-line

   string-list = "[" string *("," string) "]" / string         ;; if
   there is only a single string, the brackets are optional

   test = identifier arguments

   test-list = "(" test *("," test) ")"

9.  扩展的例子
下面是对滤网语言进行扩展的例子,注意其中没有使用隐含留存。
    #
    # Example Sieve Filter
    # Declare any optional features or extension used by the script
    #
    require ["fileinto", "reject"];

    #
    # Reject any large messages (note that the four leading dots get
    # "stuffed" to three)
    #
    if size :over 1M
            {
            reject text:
    Please do not send me large attachments.
    Put your file on a server and send me the URL.
    Thank you.
    .... Fred
    .
    ;
            stop;
            }
    #

    # Handle messages from known mailing lists
    # Move messages from IETF filter discussion list to filter folder
    #
    if header :is "Sender" "owner-ietf-mta-filters@imc.org"
            {
            fileinto "filter";  # move to "filter" folder
            }
    #
    # Keep all messages to or from people in my company
    #
    elsif address :domain :is ["From", "To"] "example.com"
            {
            keep;               # keep in "In" folder
            }

    #
    # Try and catch unsolicited email.  If a message is not to me,
    # or it contains a subject known to be spam, file it away.
    #
    elsif anyof (not address :all :contains
                   ["To", "Cc", "Bcc"] "me@example.com",
                 header :matches "subject"
                   ["*make*money*fast*", "*university*dipl*mas*"])
            {
            # If message header does not contain my address,
            # it's from a list.
            fileinto "spam";   # move to "spam" folder
            }
    else
            {
            # Move all other (non-company) mail to "personal"
            # folder.
            fileinto "personal";
            }

10.   安全性问题
用户必须能够得到他们的邮件,实现无论采用何种方法保存都必须保证用户定义的过滤
程序是安全的。同样重要的是实现必须详细检查用户的描述程序,不允许用户建立一个定时
的邮件炸弹。比方说,如果允许反复拒收或转发一个邮件,就可能意味着准许用户建立一个
靠来自特定用户的邮件激活的邮件炸弹。站点或者事先定义的动作限制对此类问题非常有
效。有几个命令,如“discard”、“redirect”和“fileinto”可能会带来潜在的危险。实现应该
设法禁止在语言中使用循环。

11.  鸣谢
非常感谢Chris Newman的支持和他的ABNF语法检查器;John Myers和Steve Hole,
他们列出了最初草案的大纲;Larry Greenfield,他仔细地进行语法检查并予以修正;Greg 
Sereda提供并反复修正文中的例子;Ned Freed则改正了其他的错误;Rob Earhart完成了最
初的实现给了我很大帮助;Randall Gellens,无数次的校对。我非常感谢卡内基.梅隆大学,
本文的大部分工作都是在那里完成的。最后我还要感谢ietf-mta-filters@imc.org邮件列表的
所有读者。

12.  作者地址
   Tim Showalter
   Mirapoint, Inc.
   909 Hermosa Court
   Sunnyvale, CA 94085

   EMail: tjs@mirapoint.com

13.  参考

   [ABNF]      Crocker, D. and P. Overell, "Augmented BNF for Syntax
               Specifications: ABNF", RFC 2234, November 1997.

   [ACAP]      Newman, C. and J. G. Myers, "ACAP -- Application
               Configuration Access Protocol", RFC 2244, November 1997.

   [BINARY-SI] "Standard IEC 60027-2: Letter symbols to be used in
               electrical technology - Part 2: Telecommunications and
               electronics", January 1999.

   [DSN]       Moore, K. and G. Vaudreuil, "An Extensible Message Format
               for Delivery Status Notifications", RFC 1894, January
               1996.

   [FLAMES]    Borenstein, N, and C. Thyberg, "Power, Ease of Use, and
               Cooperative Work in a Practical Multimedia Message
               System", Int. J.  of Man-Machine Studies, April, 1991.
               Reprinted in Computer-Supported Cooperative Work and
               Groupware, Saul Greenberg, editor, Harcourt Brace
               Jovanovich, 1991.  Reprinted in Readings in Groupware and
               Computer-Supported Cooperative Work, Ronald Baecker,
               editor, Morgan Kaufmann, 1993.

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

   [IMAP]      Crispin, M., "Internet Message Access Protocol - version
               4rev1", RFC 2060, December 1996.

   [IMAIL]     Crocker, D., "Standard for the Format of ARPA Internet
               Text Messages", STD 11, RFC 822, August 1982.

   [MIME]      Freed, N. and N. Borenstein, "Multipurpose Internet Mail
               Extensions (MIME) Part One: Format of Internet Message
               Bodies", RFC 2045, November 1996.

   [MDN]       Fajman, R., "An Extensible Message Format for Message
               Disposition Notifications", RFC 2298, March 1998.

   [RFC1123]   Braden, R., "Requirements for Internet Hosts --
               Application and Support", STD 3, RFC 1123, November 1989.

   [SMTP]      Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC
               821, August 1982.

   [UTF-8]     Yergeau, F., "UTF-8, a transformation format of Unicode
               and ISO 10646", RFC 2044, October 1996.

14. 版权声明
   Copyright (C) The Internet Society (2001).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS 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.

Acknowledgement

   Funding for the RFC Editor function is currently provided by the
   Internet Society.



RFC3028——Sieve: A Mail Filtering Language                               滤网:一种邮件过滤语言


2
RFC文档中文翻译计划


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -