These instructions assume you're using hMailServer version 4.0 or higher. They are applicable to mail marked as spam using ASSP, but should work equally well with any other spam filter. It is only necessary that the filter put a spam flag in the header, for example, simply by replacing steps 3 and 4 below with the appropriate Header and Value.
- Open hMailAdmin
- Select Rules (to create a rule that applies globally)
- Click Add
- Give the rule a name
- Click Add next to Criteria
- Select Custom Header and enter X-Assp-Spam
- Enter YES in the value field
- Click Save
- Click Add next to Action
- Select Move to IMAP Folder
- Under Folder enter the folder you want to move it to (example: Inbox\SPAM)
The folder will automatically be created for users if it doesn't exist the first time they receive a spam message.
Contributed by Colin Murphy