Search code examples
telnetubuntu-18.04dovecot

can Telnet via SSH log into email server? am getting auth error


I am using Telnet on an Ubuntu 18.04 Server being accessed via SSH. I log into the email server being set up that uses PostFix and DoveCot, to test if the "[email protected]" mail account is working.

This is the exchange:

root@xxxxxxx:/var/log# telnet xxxxxxx.com 110 
Trying 2600:3c01::f03c:92ff:fe93:5fa0... Connected to xxxxxxx.com. 
Escape character is '^]'. +OK     Dovecot (Ubuntu) ready.
USER phil +OK 
PASS fakepassword 
-ERR [AUTH] Authentication failed.

I'm not trying to solve the entire mystery here, but just wanted to check on whether this is a valid use of Telnet. A website about using Telnet states the following:

However, you should note that Telnet is not encrypted. Most public internet services, such as Google or Yahoo, require an encrypted connection—which isn't supported by Telnet.

Is this a situation were the lack of encryption might contribute to the authentication failure? I'm guessing not, since I'm not going through a browser. I just wanted to verify that if everything was set up right, this would be a valid way to test the email account.


Solution

  • Yes, you can use telnet for protocol exploration. POP3 in this case is text based and not wrapped in TLS, so it works out without any other advanced tools (eg openssl).

    That said you will want to familiarize yourself with the POP3 AUTH exchange, which is probably not going to accept credentials in cleartext these days. (If this were 1999, different story.)

    https://ietf.org/rfc/rfc1939.txt

    You might consider using an actual email program (MUA in the parlance) to negotiate the connection, in tandem with a protocol sniffer like wireshark to see how the exchange works.