happened to me too on a brand new windows 8 asus fresh factory install using latest avast 8.0.1483
but i want to note a few other items i also discovered in a weekend troubleshooting process before following a hunch that avast port/ssl might be worth looking into.
turning on 'inbound mail scanner' not only threw the certificate dialog which worked for only that session if i accept the exception 'permanently' and the mail stops downloading after that session. but that same "on" setting also caused elements on my keyboard to stop working incl. the touchpad clicker and the arrow keys. deleting the exception, using TB 995 SSL and turning off 'scan inbound mail' in settings released the grip avast had on my keyboard and allowed my SSL port: 995 email to download properly.
it took my whole sunday to figure this out, so not too confident i should bother to take the additional steps to import the certificate/exception per steps
http://www.avast.com/faq.php?article=AVKB91#artTitle (if i must do this everytime i change or setup a new machine - at least past versions would provide user info/option to change ports to enable SSL scanning etc.) specially, if scanning mail isnt that critical or advisable if AV programs detect and stop viruses as soon as they try to execute and the risk of allowing an AV to delete or quarantine virus could result in the whole email folder (your inbox) to disappear.
i'd like to 2nd all of these sentiments:
-There is simply no other reasonable conclusion but that Avast SSL mail scanning does not presently work properly with at least some SSL accounts set up on Thunderbird.
-I had to delete the existing certificate in Thunderbird to get this working
-Got mine working by following the export/import certificate dance. I am an IT guy and this was anything but straightforward; I pity the average home user who encounters this issue. I am amazed that Avast expects people to 1) FIGURE OUT the cause of this problem. Thunderbird puts up a generic SMTP error. Even an experience googler will find it VERY difficult to attribute the problem to Avast.