Apple Mail - no such file

When I try to delete obviously spammy messages from my Apple Mail (vers 9.2) inbox, I often get a message telling me there’s no such file. I’m guessing that Avast had junked it but it still shows up in my inbox. What to do? Am I going to have to rebuild my Envelope Index all the time now?