Avast Web Shield acts sort of like a proxy in how it intercepts HTTPS traffic. Try using your proxy with the mail shield disabled, at least long enough to get the auto config file from your proxy.