This is a classic problem, discussed many times already.
Let me recap: the avast Mail and Web Shields are implemented as standalone Windows services. (Windows services are special programs that support a specific interface and that can be controlled via Control Panel -> Administrative Tools -> Services). Now, system services generally cannot be started in parallel (that is, they are started one by one). In other words, if it takes a long time to start a service (I mean any service), all the other services that were scheduled to start after this service have to wait till the slow service reports it has started.
Now, on surprisingly many systems, some system services take ages to start. Typical examples are the "Workstation" and/or "Universal Plug and Play" services. These often take minutes to start - depending on the network connection you are using etc.
As a result, the system will not start the avast Web and Mail shield services before these offending/slow services complete their startup, and during that time, the avast taskbar icon indicates the warning status.
It has been like this since avast 4.0 (roughly 2004). In v5.1, we're finally solving this problem by not making Web and Mail Shield system services at all. Their startup/shutdown will be controlled internally by avast only, effectively resolving the issue.
Thanks
Vlk