设置服务器邮件规则
您可以创建内容过滤规则来定义对某些消息采取的操作。当满足指定条件的新消息存入MAIL.BOX时, Domino ®会自动执行指定的操作。可能的操作包括记录消息、将其移至数据库、拒绝接受或传递消息、更改消息的路由状态或停止后续规则的处理。规则条件基于邮件标头或邮件正文中的内容。
关于这个任务
邮件规则会在各种情况下自动处理邮件。通过配置一组条件和操作,您可以自定义规则来阻止垃圾邮件或拦截内容可疑的邮件。例如,您可以创建一条规则,拒绝包含可疑主题行的邮件(例如MAKE_MONEY_FAST!!!
)或来自已知垃圾邮件供应商的邮件。类似地,您可以通过设置规则来拦截包含某些文件类型(EXE、VBS、VBE、SCR 等)附件的邮件,并将其重定向到隔离数据库,从而限制用户接收没有商业目的的邮件附件,管理员可以在该数据库中进行审查,并可以选择将其发送给预期的收件人。
除非规则操作明确表明,否则如果规则阻止消息到达目的地, Domino ®不会通知发件人或收件人。例如,如果某条规则导致某条消息被路由到墓地数据库, Domino ®不会生成投递失败报告,也不会向预期收件人指出发给他们的消息已被拦截。相比之下,如果邮件触发了包含指定两部分操作的规则,则不发送邮件/ 发送 NDR ,发件人收到一份投递失败报告,指出该邮件由于政策原因被拒绝。
邮件规则并非旨在作为防病毒解决方案,不应被视为防病毒软件的替代品。虽然您可以配置规则来隔离带有已知病毒附件的邮件,但可用的规则操作不包括典型的防病毒功能,例如在检测到病毒时生成警告或自动对文件进行消毒。
Domino ®将您创建的邮件规则存储在配置设置文档中。启动时,每个服务器都会从适当的配置设置文档中检索信息,并将其注册为每个正在使用的MAIL.BOX数据库上的监视器。
每当MAIL.BOX从任何来源(SMTP 进程、另一台服务器上的路由器或存放消息的客户端)接收到新消息时,服务器都会根据已注册的邮件规则评估各个消息字段。每条消息仅被评估一次。将邮件添加到MAIL.BOX之后发生的额外更新(例如反映所处理的收件人数量的更新)不会导致重新评估规则。
Stopping the processing of a mail rule
关于这个任务
设置邮件规则时,您可以使用停止处理操作来停止处理遵循包含停止处理操作的规则的所有规则。停止处理操作可以单独使用,即作为一条邮件规则中唯一的操作,也可以将它与一条规则中的另一个操作一起使用,也可以将它放在一系列规则中的一条规则中。当一条消息可以应用多条规则,但您希望在执行第一个操作后停止执行邮件规则时,这尤其有用。例如,您可以定义以下规则:
- 规则 1)如果主题包含营销,则移至数据库营销信息并停止处理规则
- 规则 2)如果主题包含销售,则不发送邮件
结果:如果主题行包含主题“营销和销售” ,则该消息将移至营销信息数据库并且处理停止。未对该消息采取任何其他操作。
当启用多个邮件规则时,您可以通过在列表中上下移动它们来设置它们的相对优先级。
实施新规则仅当文档先前已保存时,“配置设置”文档才会显示新的邮件规则。
当您添加新规则时,只有在服务器重新加载邮件规则后才能生效。如果服务器任务在对配置设置文档进行例行检查时检测到规则更改,则会自动触发重新加载。此检查大约每五分钟进行一次。
您可以使用控制台命令强制服务器重新加载规则。
在服务器控制台输入以下命令:
制定规则To create a new mail rule
关于这个任务
程序
- 确保您已经拥有将应用规则的服务器的配置设置文档。
If you are creating a new Configuration Settings document, complete the Group or Server name field on the Basics tab, and then click save and close the document. Then reopen the document to begin adding rules. If you attempt to add a new rule before saving a new document, you are prompted to save the configuration before proceeding.
- From the Domino® Administrator, click the Configuration tab and expand the Messaging section.
- Click Configurations.
- Select the Configuration Settings document for the mail server or servers you want to administer, and click Edit Configuration.
- Click the tab.
- Click New Rule.
- In the Specify Conditions section
of the New Rule dialog box, set the criteria the server uses to determine
whether to apply a rule to a given message. A rule condition can include
the following components:
Table 1. Rule conditions Condition component Description Message item to examine
Specifies the Notes® message item that the SMTP listener, the router, or the client examines when evaluating whether to apply a rule. Choose one of the following: Sender, Subject, Body, Importance, Delivery priority, To, CC, BCC, To or CC, Body or subject, Internet domain, Size (in bytes), All documents, Attachment name, Number of attachments, Form, Recipient count, Any recipient, Blacklist tag, or Whitelist tag.
Note: To create a rule that acts on all messages deposited in MAIL.BOX, choose All DocumentsLogical operator or qualifier
Specifies how the Router evaluates the content of the target field. Choose one of the following:
- contains (for text field values)
- does not contain (for text field values)
- is
- is not
- is less than (for numeric field values)
- is greater than (for numeric field values)
For example, if you selected the message item Attachment Name, selecting the qualifier is defines a rule that acts on all messages having an attached file with a name that exactly matches the name you specify.
Value to check in message item
Specifies the content to search for in the target message item.
For example, if the target message item is Attachment Name and the qualifier is contains, enter .VBS to create a rule that acts on all messages having an attached file with a name containing the string .VBS, including, LOVE-LETTER.VBS, CLICK-THIS.VBS.TXT, and MY.VBS.CARD.EXE.
Note: When defining a match against a user's name, specify the canonical format, for example, UserName/Sales/East- Text fields do not support wildcard values, such as the asterisk character (*). To specify a search string for a target field, use the contains operator and enter the search string in the accompanying text field. For example, as in the preceding example, to search for an attached file with a name that contains the string .VBS, create the condition Attachment Name contains .VBS, not Attachment Name is *.VBS.
- Search string text is not case sensitive.
- When indicating numeric values, always enter a numeral, rather than its text equivalent. That is, enter 2, not two.
- Click Add.
- Optional: Modify the condition by doing the
following:
- Add more conditions, by selecting Condition, and then selecting AND or OR. Repeat Steps 7 and 8 for each new condition.
- Add an exception by selecting Exception and repeating Steps 7 through 9 for each exception. You can add only one exception to a condition statement.
- In the Specify Actions section specify
the action to perform when a message arrives that matches the condition
statement, and click Add Action. You can specify
one action per rule.
Table 2. Mail rule actions Action name Description Journal this message The Router sends a copy of the message to the configured Mail journaling database and continues routing the message to its destination. Journaling must be enabled on the Router/SMTP - Advanced - Journaling tab.
Move to database The Router removes the message from MAIL.BOX and quarantines it in the database specified in the accompanying text field, for example, GRAVEYARD.NSF. The specified database must already exist. The message is not routed to its destination. Placing messages in a quarantine database lets you examine them more closely for viruses or other suspicious content.
Don't accept message Domino® rejects the message, but the Router does not generate a delivery failure report. Depending on the message source, the sender may or may not receive an NDR or other indication that the message was not sent.
- When Domino® does not accept an incoming SMTP message it returns an SMTP "permanent error" code to the sending server, indicating that the message was rejected for policy reasons. SMTP permanent errors (500-series errors) indicate error types that will recur if the sender attempts to send to the same address again. Depending on the configuration of the sending client and server, the message originator may then receive a Delivery Failure report.
- For messages received over Notes® routing, Domino® returns a Delivery Failure Report indicating that the message violated a mail rule.
- For messages deposited by a Notes® client, the sending client displays an error indicating that the message violated a mail rule.
Don't deliver message Domino® accepts the message, but rather than sending it to its destination, it processes the message according to one of the following specified options:
- Silently delete - Domino® deletes the message from MAIL.BOX with no indication to the sender or recipient.
- Send NDR - Domino® generates a nondelivery report and returns it to the sender. The MIME and Notes® rich-text versions of messages sent from a Notes® client result in separate delivery failure reports.
Change routing state Domino® accepts the message but does not deliver it. Instead, it marks it as held, changing the value of the RoutingState item on the message to HOLD. This change to the routing state of the message causes the Router to retain the message in MAIL.BOX indefinitely, pending administrative action.
Note: When you mark a message as held, other rules are not executed until the "held" message is released.Domino® differentiates between messages held by a mail rule and messages held as undeliverable.
Note: This action may not work properly on servers where third-party products, such as certain types of anti-virus software, also manipulate the RoutingState item.Stop processing Domino® stops processing any rules that apply to the message when the stop processing action is encountered in a rule. Subsequent rules for that message are not executed.
- To save the rule and put it into effect immediately, click OK.
To save the rule but delay putting it into effect, click the Off radio button, and then click OK.
- Optional: After you create several rules, you can rearrange them to indicate their relative priority. The server executes each rule in turn, beginning with the first rule in the list. To change the position of a rule, select it and click Move Up or Move Down. Place rules with security implications higher in the list to ensure that the server processes them before other rules.
- Click Save & Close.
- The change takes affect the server task registers it or
after the
set rules
command is received.
Results
If MAIL.BOX receives an encrypted message (Notes® encrypted, S/MIME, PGP, and so forth), the server mail rules process any rule conditions that are based on unencrypted information in the message envelope, such as the sender, importance, and recipients, but do not process conditions based on the encrypted portion of the message body. Most rule conditions are based on information in the message envelope. The server does not log instances in which rules are unable to process a message.
Specifying the message form in a condition
关于这个任务
You can specify which types of messages a rule acts on by specifying the message form type in the rule condition. When evaluating the form type, the server checks the Notes® message form used (the Form item displayed in the Document properties); it does not use form information defined in MIME items in the message. All messages deposited in MAIL.BOX are rendered as Notes® documents, including inbound Internet messages in native MIME format. By default, messages received over SMTP use the Memo form, except for SMTP Nondelivery reports, which Domino® renders using the NonDelivery Report form. Common Notes® form names include:
- Appointment
- Delivery Report
- Memo
- NonDelivery Report
- Notice
- Reply
- Return Receipt
- Trace Report