A little search on this board would have given you the answer. Avast can scan pop/smtp/imap mail accounts. Unless you pay for Yahoo services, Yahoo is webbbased and will not be scanned. Yahoo however has a scan facility even in their freeware account.
If you download a mail and/or attachment from Yahoo. It will be scanned. Not by the mail scanner but by the on-access scanner since you are accessing a file.