I'm not sure how this would work in Thunderbird but you could use silent mode.
You only have a limited option in the Home (free) version, to send the infected file to the virus Chest (silent mode, with general answer no, see below).
My own feeling on this is you should use the default interactive action. This way you know exactly what is going on with your system. If you are getting so many warnings, that you want to automate this process, I believe you should review your security practice - filter emails at source, delete from server rather than download them, sites they visit, etc.
See the avast help file, Resident Protection: Internet Mail Provider Settings - "Advanced" Page.
Click on
Internet Mail and then on
Customize.
Go to
Advanced tab and select
Silent Mode and the General answer
No.