Use telnet to manually send and receive SMTP/pop mails)

Source: Internet
Author: User
Document directory
  • Use telnet to manually send and receive SMTP/pop mails
Use telnet to manually send and receive SMTP/pop mails

Note: manual input is represented in a blue font, and # is followed by a comment, which cannot be entered.

========= Calculate the base64 encoded username and password first, Used for authentication login ==========
[Crazywill @ localhost crazywill] $ Perl-mmime: base64-e 'print encode_base64 ("crazywill ");'
Y3jhenl3awxs

[Crazywill @ localhost crazywill] $ Perl-mmime: base64-e 'print encode_base64 ("mypassword ");'
Bxlwyxnzd29yza =

================================ Start the SMTP mail sending operation ==========================================

[Crazywill @ localhost crazywill] $ Telnet smtp.163.com 25 # telnet to port 25
Trying 202.108.5.81...
Connected to smtp.163.com.
Escape Character is '^]'.
220 163.com coremail SMTP (Anti Spam) System
EHLO smtp.163.com # handshake
250-mail
250-pipelining
250-auth login Plain
250-auth = login Plain
250 8 bitmime
Auth login # Start authentication Login
334 dxnlcm5hbwu6
Crazywill
334 ugfzc3dvcmq6
Mypassword
535 error: authentication failed # login failure due to direct user name and password
AUTH LOGIN
334 dxnlcm5hbwu6
Y3jhenl3awxs
334 ugfzc3dvcmq6
Bxlwyxnzd29yza =
235 authentication successful # log on successfully using base64 encoding
Mail from: <test@163.com> # mail sender
553 you are not authorized to send mail, authentication is required # mail cannot be forged
Mail from: <crazywill@163.com> # mail sender
250 mail OK
Rcpt to: <crazywill@163.com> # recipient of the message. If there are multiple recipients, repeat this statement multiple times.
250 mail OK
Data # body content
354 please start mail input.
To: crazywill@163.com # Here to, from, and other content, you can casually fake :) can lie but can't lie to know how to view the mail source code.
From: cccc@163.com
Subject: Test by Telnet/SMTP

Test, just a test. # The Body of the email, which is written with a blank line from the header.
. # After the email is completed, enter the result with a period.
250 mail OK queued as smtp10, wkjadq2apxrnnqbe0cwaew ==. 38326s3 # If 250 is returned, the message is sent successfully.
Noop # empty statement, which does not execute any operation. It is generally used to maintain connection with the server and do not drop the line
250 OK
Quit # exit
221 closing connection. Good bye.
Connection closed by foreign host.
[Crazywill @ localhost crazywill] $

================================ Start the POP3 mail receiving operation ==========================================

[Crazywill @ localhost crazywill] $ Telnet pop.163.com 110 # telnet to port 110
Trying 202.108.5.104...
Connected to pop.163.com.
Escape Character is '^]'.
+ OK Welcome to coremail mail POP3 server (163com [20050206])
User crazywill # User Name
+ OK core mail
Pass mypassword # logon Password
+ OK 254 message (s) [27676669 byte (s)]
Stat # view email status
+ OK 254 27676669
List # email list
+ OK 254 27676669
1 2468
2 21945
3 33136
4 2071
5 3364
6 18906
7 3136
8 24764
.................

Top 254 0 # view the specified mail header. 0 indicates that the entire mail header is viewed, and other positive integers indicate the maximum number of rows returned.
+ OK core mail
Received: From smtp.63.com (unknown [58.252.70.158])
By smtp5 (coremail) with smtp id wkjredra9giffqlejcnrag =. 29062s4;
Mon, 03 Jul 2006 21:07:18 + 0800 (CST)
To: crazywill@163.com
From: cccc@163.com # Here is a fake wig before sending information, usually normal operation only show this.
Subject: Test by Telnet/SMTP # subject
Message-ID: <44a91687. 0e6f6c. 07562>
Date: Mon, 3 Jul 2006 21:07:19 + 0800 (CST)
Sender: crazywill@163.com # here is the real sender and cannot be forged.

.
RETR 254 # obtain a specified email
+ OK 354 octets
Received: From smtp.63.com (unknown [58.252.70.158])
By smtp5 (coremail) with smtp id wkjredra9giffqlejcnrag =. 29062s4;
Mon, 03 Jul 2006 21:07:18 + 0800 (CST)
To: crazywill@163.com
From: cccc@163.com
Subject: Test by Telnet/SMTP
Message-ID: <44a91687. 0e6f6c. 07562>
Date: Mon, 3 Jul 2006 21:07:19 + 0800 (CST)
Sender: crazywill@163.com

Test, just a test.
.

Dele 254 # Delete 254th emails
+ OK core mail
Stat # view email status
+ OK 253 27676315
Quit # exit
+ OK core mail
Connection closed by foreign host.
[Crazywill @ localhost crazywill] $

===========================================================================

Question:
How do I send data to multiple users, CC, and BCC?

Answer: (snifferpro listens to outlook and sends multi-user emails for analysis.)
Send/CC the same letter to multiple users. After mail from: <...>, use rcpt to: <...>
Each time an email address is sent, Rcpt is sent to the number of recipients.

CC, BCC, to, and other information written in data only displays data.And has nothing to do with the actual recipient.

The difference between CC and BCC: both are the specified recipients of rcpt to, but the mail client program will not write the BCC recipients to the data to be transferred.

===========================================================================

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.