# Adding and Editing Inbound Domain Processing Rules

You can use inbound processing rules to direct incoming mail for a host, to particular mailboxes based on the contents of the To, From, Sender, Subject, Header or Body fields of a message.

## Adding a New Inbound Rule

1. From the Field list box, select the rule that you want to create. You can select from: From, To, Subject, Sender, Body Text or Header Text.

2. Select contains to have the processing rule look for messages that contain the search text. Select does not contain to look for messages that do not contain the search text.

3. To enter search text, you can either enter it into the PHRASE Text box as described below, or specify an external file that contains the search text you want to use.

4. Enter the search text by doing one or more of the following:

- Enter the literal text (up to 255 characters) that you want to search for. For example, if you want to find the word jazz, type: jazz.

- Type search expressions and quantifiers as shown in Text Patterns.

- Paste a portion of a mail message that meets your search criteria. For example, you could copy and paste text such as "XMSMailPriority(High)" from the header of a message; this would search for High priority messages.

5. Check Search string from file if you have placed the search text in an external text file. The list box shows a list of the existing rule files.

6. Select Case Sensitive Match to search for text that matches the case of the search string; to ignore case, clear Case Sensitive Match.

7. Specify what will be done with messages meeting the rule criteria by choosing one of the following options:

- Send the message to a mailbox. Select Move the message to this mailbox. Then, in the text box to the right of this option, enter the name of the mailbox to which messages meeting the rule criteria will be sent. If you enter a mailbox that does not exist, one will be created for the user on the IMail Server system. A POP3 user will see this mailbox only if he logs on to this mailbox using the format userid-mailbox. By default, if nothing is entered in this text box, messages meeting the rule criteria will be sent to the user's Main mailbox.

- Send the message to an address. Select Forward the message to. Then, in the text box to the right of this option, enter the e-mail address to which messages meeting the rule criteria will be sent. You must enter the full e-mail address, such as Fred@domain1.com.

- Delete the message. Select Delete the message to delete the message.

- Deliver the message and copy to an additional mailbox. Select Copy to deliver the message to its intended recipient as well as copy it to an additional mailbox that you specify in the Address text box.

- Return the message to sender. Select Bounce to send the message back to the sender without being processed.

Note: The above three options cannot be combined, you must choose only one.

8. Click Add Condition. The condition that you just created is added to the rule and is displayed in the Rule text box.

9. If this is the only condition you want the rule to have, click Finish and the rule will be activated. If you want to add multiple conditions, read the next section.

Tip: To delete any single line from the Rule text box, select the line to delete and click Remove.

## Adding and Editing Multiple Conditions

To add more than one condition to a rule, create the first condition by following steps 1 through 8 above and then click either the "Insert AND" or the "Insert OR" button. Create the second condition as you did the first, then click Finish.

## Deleting a Condition from a Rule

To delete a condition, select the condition from the Rules text box. Then click Remove. You must then click Finish to save your changes.

## Changing the Processing Order of Conditions

Conditions are processed in the order that they appear from top to bottom, as boolean expressions. To change the processing order of a condition, select the condition in the Rule text box and click either Move Up or Move Down.

Related Topics

Overview of Processing Rules

Modifying Inbound Domain Processing Rules

Adding an Outbound Domain Processing Rule

Adding Multiple Conditions to Rules

Determining which Rule Trapped a Message