MTA---SMTP (25,postfix,sendmail), POP3 (110,devocot), MUA (Foxmail) IMAP (server,client rsync)

Source: Internet
Author: User
Tags imap rfc822

Use Telnet for SMTP authentication ========= first calculate BASE64 encoded username password, authentication login need to use ===========
[[email protected] crazywill]$ perl-mmime::base64-e ' Print encode_base64 ("Crazywill"); '
Y3jhenl3awxs

[[email protected] crazywill]$ perl-mmime::base64-e ' Print encode_base64 ("MyPassword"); '
bxlwyxnzd29yza==
====================== Start SMTP mail operation ==========================
[Email protected] crazywill]$ telnet smtp.163.com #telnet登录25端口
Trying 202.108.5.81 ...
Connected to smtp.163.com.
Escape character is ' ^] '.
163.com coremail SMTP (Anti Spam) System
EHLO smtp.163.com # Handshake:)
250-mail
250-pipelining
250-auth LOGIN PLAIN
250-auth=login PLAIN
8BITMIME
AUTH Login # Start Authentication login
334 Dxnlcm5hbwu6
Crazywill
334 Ugfzc3dvcmq6
MyPassword
535 Error:authentication failed # Direct user name password cannot log in
AUTH LOGIN
334 Dxnlcm5hbwu6
Y3jhenl3awxs
334 Ugfzc3dvcmq6
bxlwyxnzd29yza==
235 Authentication Successful # Successful login with BASE64 encoding
Mail from:<[email protected]> # Email Sender
553 you aren't authorized to send mail, authentication is required # non-counterfeit send mail
Mail from:<[email protected]> # Email Sender
+ Mail OK
RCPT To:<[email protected]> # The receiver of the message, if there are multiple recipients, repeat this statement multiple times.
+ Mail OK
DATA # message body content
354 please start mail input.
To: [email protected] # here To,from, and other content, can be casually fake:) Can cheat but can't cheat to know how to check the source of mail.
From: [Email protected]
Subject:test by TELNET/SMTP

Test, just a test. # The message body content, with the header part empty line begins to write
. # After the message has been written, a period plus a return result.
+ Mail OK queued as Smtp10,wkjadq2apxrnnqbe0cwaew==.38326s3 # returns 250 indicates a successful send.
NOOP # Empty statement, do not take any action, generally used to maintain and server connection, do not drop the line
OK
Quit # exit
221 Closing connection. Good bye.
Connection closed by foreign host.
[Email protected] crazywill]$


====================== start POP3 receiving Operation ==========================

[Email protected] crazywill]$ telnet pop.163.com #telnet登录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 # Username
+ok Core Mail
PASS MyPassword # Login Password
+ok 254 Message (s) [27676669 byte (s)]
STAT # View Mailbox Status
+ok 254 27676669
List # Mailing lists
+ok 254 27676669
1 2468
2 21945
3 33136
4 2071
5 3364
6 18906
7 3136
8 24764
.................

TOP 254 0 # View the message header for the specified message, 0 to view the entire message header, and other positive integers to indicate how many rows are restricted.
+ok Core Mail
Received:from smtp.63.com (Unknown [58.252.70.158])
by SMTP5 (Coremail) with SMTP ID wkjredra9giffqlejcnrag==.29062s4;
Mon, Jul 2006 21:07:18 +0800 (CST)
To: [Email protected]
From: [email protected] # here is a false sender information forged in front of the letter, usually normal operation only show this.
Subject:test by telnet/smtp # Mail subject
Message-id: <44A91687.0E6F6C.07562>
Date:mon, 3 Jul 2006 21:07:19 +0800 (CST)
Sender: [email protected] # here is the real sender, not counterfeit.


.
RETR 254 # Get the specified message
+ok 354 octets
Received:from smtp.63.com (Unknown [58.252.70.158])
by SMTP5 (Coremail) with SMTP ID wkjredra9giffqlejcnrag==.29062s4;
Mon, Jul 2006 21:07:18 +0800 (CST)
To: [Email protected]
From: [Email protected]
Subject:test by TELNET/SMTP
Message-id: <44A91687.0E6F6C.07562>
Date:mon, 3 Jul 2006 21:07:19 +0800 (CST)
Sender: [Email protected]

Test, just a test.
.

DELE 254 # Delete No. 254 message
+ok Core Mail
STAT # View Mailbox Status
+ok 253 27676315
Quit # exit
+ok Core Mail
Connection closed by foreign host.
[Email protected] crazywill]$


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

QUESTION:
How to send to many people, how to CC,BCC?

ANSWER: (This answer is analyzed by Snifferpro Listening to send multi-person messages from Outlook)
The same letter sent/copied to many people, after the mail from:<...>, multiple use RCPT to:<...>
Each time an email address, how many people need to send RCPT to how many times.

In the data is written in the cc,bcc,to, and other information only play a role, and the actual sender is not the recipient of the person.

The difference between CC and Bcc: The same is RCPT to the specified recipient, but the mail client program does not write the BCC recipient to the data to be transferred. using IMAP

[Email protected] crazywill]$Telnet 192.168.0.1 143 #telnet登录IMAP协议的143端口
Trying 192.168.0.1 ...
Connected to XXXXXX
Escape character is ' ^] '.
* OK xxxxxxx System IMap Server Ready
A01 LOGIN ABC 123 #用户登录
A01 OK LOGIN completed
A02 LIST "" * #列出所有信箱列表
* LIST () "/" "INBOX"
* LIST () "/" "Drafts"
* LIST () "/" "Sent Items"
* LIST () "/" "Trash"
* LIST () "/" "Junk e-mail"
* LIST () "/" "Virus Items"
* LIST () "/" "&xfjt0zabkk5o9g-"
* LIST () "/" "&g0l6pw-"
* LIST () "/" "&xfjt0zabkk5o9g-/dailyreport"
* LIST () "/" "Jira"
* LIST () "/" "Admin"
* LIST () "/" "&v4nxppcutvy-"
A02 OK LIST completed
A03 Select INBOX #选择收件箱
* Panax Notoginseng EXISTS
* 0 Recent
* OK [uidvalidity 1] UIDs valid
* FLAGS (\answered \seen \deleted \draft)
* OK [Permanentflags (\answered \seen \deleted \draft)] Limited
A03 OK [Read-write] SELECT completed
A04 Search All #查询收件箱所有邮件
* OK X-search in progress
* OK X-search in progress
* OK X-search in progress
* SEARCH 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
A04 OK SEARCH Completed # Lists the eligible message ordinals (all means all messages in the current mailbox inbox are listed)
A05 Search New #查询收件箱所有新邮件
* OK X-search in progress
* OK X-search in progress
* OK X-search in progress
* SEARCH
A05 OK SEARCH completed #找不到任何新邮件
A06 Fetch 5 Full #获取第5封邮件的邮件头
* 5 FETCH (internaldate "27-jun-2006 14:00:27 +0800" FLAGS (\seen) ENVELOPE ("Tue, June 2006 13:56:51 +0800" "Test" (" XXXXXX "nil" xxxx "" xxxxxx ") ((" xxxxxx "nil" xxxx "" xxxxxx ")) ((" xxxxxx "nil" xxxx "" xxxxxx ")) (Nil nil" xxx "" xxxxx ")) Nil Nil Nil "<[email protected]> ") BODY ((" Text "" Plain "(" CharSet "" "gb2312") nil nil "base64" 2) ("Text" "HTML" ("CharSet" "gb2312") nil nil "base "420 7)" alternative ") RFC822. SIZE 1396)
A06 OK Fetch completed
A07 Fetch 5 rfc822 #获取第5封邮件的完整内容
* 5 FETCH (RFC822 {1396}
[Here is the message content, too long, slightly ...]
A07 OK Fetch completed
a08 Fetch 5 flags        #查询第5封邮件的标志位
A08 OK Fetch completed
a09 Store 5 +flags.silent (\deleted)            #设置标志位为删除
A09 OK STORE completed
a10 expunge               #永久删除当前邮箱INBOX中所有设置了 Letter of the \deleted logo
A10 OK expunge completed
a11 noop                   # Empty statement
A11 OK NOOP completed


A20 logout               #退出
* BYE IMAP4rev1 Server logging out
A20 OK LOGOUT completed
Connection closed by foreign host.
[[email protected] crazywill]$

MTA---SMTP (25,postfix,sendmail), POP3 (110,devocot), MUA (Foxmail) IMAP (server,client rsync)

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.