Open GyazMail’s Preferences window and click Junk Filter. Make sure that Enable Junk filtering is checked and that the pop-up menu says SpamSieve.
By default, GyazMail will color the spam messages brown. If you want the spam messages to also be put in a separate folder, create a folder called Spam. Then click on Rules in the Preferences window and create a new rule as shown:

Now proceed to the Do an Initial Training section. To train SpamSieve with spam messages, select the messages, go to GyazMail’s Message menu, and choose Junk ‣ Mark as Junk. To train SpamSieve with good messages, select the messages, go to GyazMail’s Message menu, and choose Junk ‣ Mark as Not Junk. You can also use the Junk button on the toolbar or the Message ‣ Status ‣ Junk menu command to toggle the junk status of the selected messages.
SpamSieve will process new mail automatically. If you ever need to manually ask it to sift through a mix of spam and good messages, select the messages and choose Junk ‣ Recheck Junk Status from the Message menu.