TLDR; For some reason despite importing the certificate into the CACERTS file I can't pull mail from a mail server.
I have an instance of service desk locally hosted. It was working fine receiving mails without a problem and then suddenly stopped.
Now when I try to connect I get one of the following depending on the method I have selected.
1. Using secure IMAP on port 993 I get "unable to find valid certification path to requested target"
2. Using IMAP on port 143 I get "No login methods supported!"
3. Using POP on port 119 I get "Connection refused (Connection refused)"
4. Using secure POP on port 995 I get "Connection refused (Connection refused)"
I have received the certificate provided for the mail server and imported it in to the CACERTS file that the instance of java that Jira uses has (and just in case I've also added it to every cacerts file I can find on the server) and restarted Jira but with no luck.
Hosting server is Oracle Linux 6, Java version is 1.8.0_181 (I know, it needs patching)
Error in the logs is
2019-09-25 10:59:04,678 ERROR [] Caesium-1-1 ServiceRunner Messaging Error when MailPullerWorker pulls emails from <redacted_user>@<redacted domain>: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target