Avast with Outlook 2007 view certificates problem.

When I start Outlook 2007, I get an “Internet Security Warning” dialog box with the message;

“The server you are connected to is using a security certificate that cannot be verified.
The target principal name is incorrect.”

I clicked on “View Certificate” and installed the certificate, but I still get this dialog each time I start Outlook.

Clicking “Yes” each time allows me to use Outlook as normal but how can get rid of this dialog?

Seems to be a common problem if I search on the web. But no one has a solution except to turn off Avast.

Any suggestions?
Thanks

Solved. Just had to uncheck scan outgoing mail in Avast.
This is only needed to be done if you install the latest Avast version.