When I search for you original problem, everything comes up stating that dovecot is not running, but if you are able to read emails sent from an outside server on your phone, it sounds like this isn’t the problem.
The second log message includes this:
Could not connect to ssl://localhost:993: Connection timed out in /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 211 (POST /mail/?_task=login&_action=login)
There seemed to be a lot of different things in search that I’m not very familiar with, and unfortunately I don’t have time to go through at the moment, but seems like a good place to start. Maybe ask your ISP about it.
Quick question - where did your Ubuntu image come from? If it was provided by GalaxyGate (eg. you request and they magically provide an Ubuntu image) then it’s very likely that it’s their special image, not quite the same as the one you’d download from ubuntu.com.
Using some google-fu I would try the following command:
openssl s_client -connect localhost:993
That would check both the connection and the ssl certificate, as some of our errors point that way. Normally this would quickly result in a lot of stuff printed on the command line (regarding certificates) ending in something like:
* OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready
Since you state that the mail client on the phone takes a long time, and the roundcube error reports a connection timeout, you might also check on things that slow down your system. Are you able to open the Munin Monitoring and check the cpu load, memory load and free disk space situation?