Testing the Current Policy

Use the Policy > Test Current Policy page to verify that configured rules are operating as expected. For example, you may have added a sender to the Blacklisted Senders list and want to verify that PureMessage no longer accepts mail from this sender.

A policy must be committed before it can be tested. However, until the Milter service is restarted, the new policy will not be active. Therefore, a policy can be tested without making it the active policy. This allows you to restore a backup policy if you are not satisfied with the performance of the new policy.

To test the current policy:

  1. On the Policy tab sidebar, click Test Current Policy.

    The Test Current Policy page is displayed.

  2. Fill in or select the settings for the text boxes in the Specify test options and message sources table.

    The test options are:

    • Select Relay Type: To test the configured policy, you must specify either the relay type or an IP address. To identify the message source based on the relay, select Internal (localhost) or External from the drop-down list.
    • ... or IP address: To identify the message source by the IP address instead of the relay, enter an IP address in this text box. This text box can also be used to emulate a host defined as a trusted relay, thus bypassing DNS tests. To bypass DNS tests, enter an IP address that is defined in the Trusted Relay IPs list.
    • Envelope From: Optionally, specify that PureMessage tests the validity of the message source based on the address specified by the message’s envelope from information instead of the message’s from address.
    • Envelope To: Optionally, specify that PureMessage tests the validity of the message source based on the address specified by the message’s envelope to information instead of the message’s to address.
    • Select sample messages: PureMessage includes a variety of sample messages for testing rules specified in the policy. To test using sample spam messages, select Infected (messages contain viruses), Spam (messages are typical examples of spam) or Normal (messages are legitimate). Additional messages can be added to the test message set. Messages must be in "mbox" format, and must be stored in the subdirectories beneath etc/data/samples/ (located beneath the PureMessage installation directory).
    • ... or paste message source here: Instead of testing with the sample messages or with a specific messagepmx file, type or paste the message source information into this text box. The format must adhere to "mbox" format. For example, specify a sender’s address by typing From:, followed by the email address. When entering message source information, be sure to position the cursor at the beginning of the text box. Also be sure there are no blank lines or spaces before or after message source text. A blank line or a space indicates the end of the message header. Any text entered afterwards is read as if it were part of the body of the message. The following text appears in the message source text box by default:
      To: PureMessage Test User <puremessage-test@ServerName.example.com>
      From: PureMessage Admin <postmaster@ServerName.example.com>
      Subject: PureMessage Test
      Date: Wed, 31 Mar 2004 00:40:06 GMT
      This message was generated to test PureMessage.
      The current local time is: Tue Mar 30 16:40:06 2004
      Have a nice day,
      PureMessage Admin
  3. When the desired test criteria is entered, click Test.

    Test results are displayed as follows:

    • Original Message File Name: If using a local message file or sample messages, the file name(s) are displayed in this column.
    • Resulting Message: Every test message is written to the quarantine regardless of the resulting action. This column lists the quarantine ID number for the message. Click the number to view the message details.
    • Delivery Action: This column displays the action that would have been taken if the message had been "live".
    • Details: Displays debug messages for the test process.