Mac, are you sure avast is scanning your mail?
If so, the settings are at the same place:
Internet Mail settings (Cutomize) > POP and SMTP tabs
‘Add a note to clean messages’ 8)