I work in tech support for a company that has an email inbox integration. Users can input IMAP and SMTP host names and ports and we will attempt to open a connection with those ports and host names so we can allow them to send emails from their email addresses via our software. Oftentimes, when customers try to connect via IMAP, we see "Unauthorized" errors, where customer' email servers reject our connection due to the information entered not being accepted.
Customers usually do not know why their servers are not allowing us to connect, and ask me for further insight. To troubleshoot why a connection is being dropped, I usually use
to take a look at the unfiltered ports on their server. Other commands I use are:
openssl s_client -connect imap.theirserver.com:port openssl s_client -crlf -showcerts -starttls imap(or smtp) -connect imap.theirserver.com:port (if the port is unencrypted)
I occasionally use dig to see information about their domain/DNS. These commands give me information about whether their ports are properly encrypted (if they have null ciphers, if ports 143/587/25 are running starttls when they should, if the ports are unfiltered, if the IMAP and SMTP certificates match, and if our connection is outright rejected.) That's about it.
I know information I can find here is limited because, for security reasons, a server that isn't mine isn't going to openly tell us why the connection was rejected. But could anyone help me build my troubleshooting strategies/tactics for this to help the customers connect their inboxes? Are there other commands I can use to determine why a connection may be rejected, or that can help me determine if they have a firewall/other security measure in place, or if there is a proxy, or if the ports simply aren't open? (or if anyone knows of any other reasons why a connection may fail, that would be extremely helpful!)
Ex: I often see something along the lines of
140735820493760:error:0200203C:system library:connect:Operation timed out:crypto/bio/b_sock2.c:108: 140735820493760:error:2008A067:BIO routines:BIO_connect:connect error:crypto/bio/b_sock2.c:109: connect:errno=60
and I am not sure what the implications of a timeout are in us being able to connect to their server.
I don't have a technical background before this job, so I apologize if any of these questions are obvious to someone with more computer science knowledge, or if any of my terminology is off! And if any of this is too vague, I'm happy to provide more details. Any educational resources on this would also be extremely helpful, since I have had a lot of difficulty finding them. Thank you!