Here are some simple, step-by-step instructions on how to setup server-side filtering on our mail system:
  1. Go to and login
  2. Click the "Folders" link at the top of the right frame

  3. Type the name of the folder (ie. "Spam") that you want spam to be automatically put put in.

  4. Click "Create"
  5. Click "(refresh folder list)" (in the left frame) and you should see your new folder

  6. Click the "Filters" link at the top of the right frame

  7. Click "Add a new rule" (bottom right)

  8. Select "Header match" and click "Move on to step 2"

  9. Click "Less..." 2 times to remove the 2 extra rows for patterns

  10. Select "X-Spam-Flag:" from the first drop down menu
  11. Ensure the second drop down menu has 'contains' selected (should be
  12. Type "YES" (without the quotes) in the text field to the far right
  13. Click "Move on to step 3"
  14. Select the "Move message into" radio button (left side/center of page)

  15. Ensure "the existing folder" option is selected
  16. Select the folder that you want tagged messages to be placed in from the drop down box to the right of "the existing folder" option
  17. Select the check box at the bottom of the page with the stop sign beside it labelled:

    "If this rule matches, do not check any rules after it."

  18. Click "Move on to step 4"
  19. Click "Finished"

  20. Click "Save Changes" (at the bottom of the page)

You can repeat the same procedure to block viruses as well.
The only difference will be that you will use "X-Amavis-Alert" instead of "X-Spam-Flag" and "INFECTED" instead of "YES" when configuring the filter pattern match (Step 2 in the web interface; Steps 10-12 above).
You will need a second pattern to block all viruses: 'X-Amavis-Alert' contains 'BANNED FILENAME'