Error:
The certificate for gmail.com could not be validated. The certificate chain presented is invalid.
Fix:
openssl s_client -showcerts -servername gmail.com -connect gmail.com:443 > /tmp/out
edit this so that the file contains only the first certificate, and
copy it to ~/.purple/certificates/x509/tls_peers/gmail.com