I came back to this after a few busy days with work..
The reply-by-email feature was working fine - connecting to the POP3S server, opening the mailbox, processing mail.
However if I SSH’d to the box, then tried to open a connection directly using openssl, it timed out. In fact it timed out to any POP3S server on the same port. ufw/iptables were configured properly to allow outbound connections to port 995 but couldn’t manage to get a connection.
I stopped the docker container, started it again, and suddenly reply-by-email stopped working. The mails were being received fine, but Discourse couldn’t open POP3S to the mail server.
I’ve added a listening port forward to get around the likely firewall issue that’s out of our control, and behold, it works.
So, my thinking is that somehow the client (Discourse site) and mail server either had a persistent connection or some sort of job-based trust relationship then the firewall at our perimeter was changed and it was dropped.
Interestingly, this did spring an idea to mind - there doesn’t seem to be a way to tell Discourse to not use SSL but use STARTTLS over POP3. I’ve never used Ruby before, but it looks like it would need to be explicitly-coded (i.e. there’s not a method in Net::POP3 to use STARTTLS. In our case, we could’ve connected using POP3 on default port and used STARTTLS. I would normally discourage this, but I wonder if it might be use to some users?
Thank you for thinking about it @zogstrip. I suspect the errors you were seeing were unrelated to my situation!