Custom filters — Example of a custom filter


This article explains how to create a simple message filter that moves an incoming email to a specific directory. This example is in reference to Vade email filters which is used on all DreamHost accounts.

This example only moves email. It does NOT teach the filters to learn what is and is not spam. To teach the filter to learn what is spam, you must log into Webmail and manually tag the message.

Vade headers

If Vade tags a message as SPAM, the headers show the following line:

X-vr-status SPAM

If the header contains this line, the email is sent to the /Spam folder in Webmail. However, if you use an email client such as Thunderbird, you may have your own custom Junk folder. The example below catches an email tagged as SPAM and moves it to your custom IMAP Junk folder named /OLDJUNK.

Creating the custom filter

  1. Navigate to Message Filters.
  2. To the right of an address, click the Edit button to open the filter page.
  3. If you have not added filters yet, click the Add New Filter button.
    The add new filter page opens where you can set up a filter:
  4. Since this example is looking for something in the header, choose 'Headers' and 'contains' from the first two dropdowns.
  5. The third field is the exact content you're looking for. In this example it's X-VR-STATUS:  SPAM.

    To ensure you catch the text, add and period and asterix before the code like this: .*texthere

  6. Choose the radio button 'Move it to folder:'.
  7. Just under the radio button, type in the name of the folder you wish this email to be sent to.
  8. When finished creating your rule, click the Add Filter button at the bottom.

What to expect

If an email is sent to you and Vade tags it as SPAM, the message now is sent to your custom IMAP Junk folder. This allows you to continue to view the Spam in the same folder currently set up in your client.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?