Having similar problems, again with Mac Mail on Snow Leopard (10.6.
with the latest beta (35600b).
I have a number of email accounts and some are working fine whilst others are timing out when attempting to connect to POP/IMAP.
The following are working fine:-
imap.gmx.com - configured as SSL in avast, now unencrypted 143 in Mail
imap.gmail.com - configured as SSL in avast, now unencrypted 143 in Mail
imap.mail.ovi.com - configured as SSL in avast, now unencrypted 143 in Mail
pop3.live.com - configured as SSL in avast, now unencrypted 110 in Mail
pop3.tiscali-business.co.uk - configured as SSL in avast, now unencrypted 110 in Mail
pop.orangehome.co.uk - unencrypted 110
The following are timing out in Mail:-
pop3.o2.co.uk - unencrypted 110
imap.tiscali.co.uk - unencrypted 143
I don't know what the avast algorithm is for checking whether to use SSL, STARTTLS, unencrypted is but it is taking far too long. The problem may be that for the two POP/IMAP hosts that are failing, attempting to connect to TCP ports 993 or 995 (with avast disabled) does not immediately fail with a TCP RST or ICMP port-unreachable response from the server so the local TCP stack sits there for ages until the timeout before reporting back to the client's connect() call. I suspect that because the avast 'transparent proxy' mail shield is sitting there waiting in this case, having already opened the connection to the Mail client, Mail times out waiting for the POP/IMAP initial protocol 'hello' lines.
What is needed is the same feature as is available on the Windows avast mail shield whereby you can manually tell avast NOT to try to attempt SSL connection to port 993/995 for a given POP/IMAP host.
(By the way, the UI for this on the Mac version is much nicer. I like the way I can put in my POP/IMAP server FQDN and avast creates labelled entries for all the IP addresses to which it resolves. This is much clearer than the Windows UI. I hope though that it re-queries the DNS for the FQDN given the TTL from the DNS server so that the entries remain valid.)