I hope it tries TLS first (1.2, 1.1, 1.0) *and then* SSL. Re. "a port is just a port". STARTTLS is not just TLS over port 143. It is actually normal IMAP on 143 and then (when already "inside") switching to an encrypted channel (via TLS). So you could not just hack Modest to to STARTTLS on 993 and hope it will work. (in case this was somehow implicitly being suggested). I guess Fremantle is slowly becoming obsolete..