Linux Telnet is quite special. Here we will explain the application in this regard. First, let's take a look at the specific content of this application. Mail is a simple software for sending and receiving mails. What if I want to send and receive mails directly through SMTP and POP3? You can use the Linux Telnet function to directly connect to the service. However, the following exercises are for reference only because you need to enter commands to process them.
First, send a mail to practice:
[Root @ Linux ~] # Mail localhost 25
Trying 127.0.0.1.
Connected to localhost.
Escape character is '_]'.
220 Linux. vbird. tsai ESMTP Postfix
Ehlo localhost <= handshake. It is very important
250-Linux.vbird.tsai <= functions provided for this SMTP Service
250-PIPELINING
250-SIZE 10240000 <= maximum SIZE of a single letter
250-VRFY
250-ETRN
250 8 BITMIME
Mail from: "VBird" <= set the source address
250 OK
Rcpt to: <= set the email address
250 OK
Data <= confirm the start of content writing
354 End data.
This is a test Mail <= start to write content
Just test! Bye!
. <== Leave a decimal point
250 OK: queued as CC8CFA26AC
Quit
In this way, the mail can be placed in the queue and waiting for sending. the trouble is that you need to manually enter all the items of the header and body, including "Mail from:", "rcpt to:", etc, the values after these two values must be enclosed in parentheses. For example:
Mail from: usersname
Mail from: "users name"
In addition, many MTA currently restrict the use of HELO or EHLO to greet Mail From. Otherwise, subsequent communication will not be allowed. What about direct reception? In Linux Telnet, you can perform the following operations.
[Root @ Linux ~] # Telnet to localhost 110
Trying 127.0.0.1.
Connected to localhost.
Escape character is '_]'.
+ OK dovecot ready.
User dmtsai <= enter your account
+ OK
Pass your_password <= enter your password
+ OK Logged in.
List <= list your emails
+ OK 3 messages: <= The following is the mail data. There are three messages in total.
1 912
2 1016
3 675
Retr 2 <= start to receive 2nd emails
+ OK 1016 octets
...
Quit <= leave Telnet
+ OK Logging out.
Linux Telnet comes online to the Local Machine for receiving and sending emails. however, it is really difficult to use. therefore, we will introduce a cross-platform window interface software which can be used on any operating system.