I was trying to use a php web mailbox connected to my mail server I kept getting this error Connection failed to mail.mydomain.com,143: Connection refused.
to troubleshoot it I tried to telnet to using telnet mail.mydomain.com143 and I got the same thing
telnet: Unable to connect to remote host: Connection refused
then I tried looking into my firewall
root@mail:~# ufw app list
Dovecot Secure IMAP
Dovecot Secure POP3
everything looks good I even tried to disable to the firewall and no luck with that either not sure where to go from here?