Detecting an infection is different from anti-spam. When an infection is detected in the email programme, the subject line of the email reads ***VIRUS***. You can then create a rule in your email client to move these emails labelled ***VIRUS*** to the file of your choice.
Unfortunately, some threats cannot be detected until the code has been executed or downloaded, which makes them difficult for anti-spam software to detect. However, you can scan the file by right-clicking on it and then Scan with Avast. This scan will be carried out by the file scanner, which has different capabilities to the anti-spam module in order to detect other types of threats.