Hi George,
avast! 5 cannot check SSL protected emails, so there is a workarounds built into the program. What it does is take unencrypted mail fro say TB, scans it, and then sends it off to gmail encrypted, so it provides the SSL for the emails.
Essentially, there is not really any need for it to scan emails, and I'm sure that there are some here that will post why, and also with a link...
IIRC Gmail scans emails (with TrendMicro I think)
To set gmail up in Thunderbird, your settings should look like the images:
-Scott-