That is the problem avast is an anti-virus not an email client or anti-spam (unless running avast Internet Security). So unless the email contains a virus avast doesn't filter emails, just scans and alerts to infection if present.
No idea what your email program is, but that should have some rudimentary email blocking/anti-spam as Pondus mentioned.
I use MailWasher Pro (paid option) as my anti-spam, that deals with spam and any other blocking, etc. deleting flagged emails at server level.