This bug report contains useful information. It might help you: https://bugs.maemo.org/show_bug.cgi?id=9262#c7
After copying the files over so that: $ md5sum /home/user/.modest/cache/*.db /etc/skel/.modest/cache/*.db|sort a5ae49867124ac75f029a9a33af31bad /etc/skel/.modest/cache/cert8.db a5ae49867124ac75f029a9a33af31bad /home/user/.modest/cache/cert8.db dda6f3f2341531f22cc9f8b3ec251677 /etc/skel/.modest/cache/key3.db dda6f3f2341531f22cc9f8b3ec251677 /home/user/.modest/cache/key3.db f5ad0e29f7f56636638b84eb5fe5bb82 /etc/skel/.modest/cache/secmod.db f5ad0e29f7f56636638b84eb5fe5bb82 /home/user/.modest/cache/secmod.db and removing /home/user/.modest/cache/mail/.camel_certs/*, I can confirm that both gmail and my personal accounts (server certificate signed by CAcert, root certificate user-installed) work without certificate validation warnings.