[ 永遠的UNIX::UNIX技術資料的寶庫 ]   GB | BIG5

首頁 > 應用技術 > 其它 > 正文
RFC821-簡單郵件傳輸協議(SMTP)中文版 - 3
http://www.fanqiang.com (2002-01-29 21:05:38)
第二步:轉發主機到目的主機 

R: 220 BBN-VAX.ARPA Simple Mail Transfer Service Ready 

S: HELO USC-ISIE.ARPA 

R: 250 BBN-VAX.ARPA 

  

S: MAIL FROM:<@USC-ISIE.ARPA:JQP@MIT-AI.ARPA> 

R: 250 OK 

  

S: RCPT TO:<Jones@BBN-VAX.ARPA> 

R: 250 OK 

  

S: DATA 

R: 354 Start mail input; end with <CRLF>.<CRLF> 

S: Received: from MIT-AI.ARPA by USC-ISIE.ARPA ; 

2 Nov 81 22:40:10 UT 

S: Date: 2 Nov 81 22:33:44 

S: From: John Q. Public <JQP@MIT-AI.ARPA> 

S: Subject: The Next Meeting of the Board 

S: To: Jones@BBN-Vax.ARPA 

S: 

S: Bill: 

S: The next meeting of the board of directors will be 

S: on Tuesday. 

S: John. 

S: . 

R: 250 OK 

  

S: QUIT 

R: 221 USC-ISIE.ARPA Service closing transmission channel 

  

確認和發送 

R: 220 SU-SCORE.ARPA Simple Mail Transfer Service Ready 

S: HELO MIT-MC.ARPA 

R: 250 SU-SCORE.ARPA 

  

S: VRFY Crispin 

R: 250 Mark Crispin <Admin.MRC@SU-SCORE.ARPA> 

  

S: SEND FROM:<EAK@MIT-MC.ARPA> 

R: 250 OK 

  

S: RCPT TO:<Admin.MRC@SU-SCORE.ARPA> 

R: 250 OK 

  

S: DATA 

R: 354 Start mail input; end with <CRLF>.<CRLF> 

S: Blah blah blah... 

S: ...etc. etc. etc. 

S: . 

R: 250 OK 

  

S: QUIT 

R: 221 SU-SCORE.ARPA Service closing transmission channel 

  

獲得和發送郵件 首先確定用戶名,然嘗試將郵件發送到用戶終端, 
當它失敗時,發送到用戶郵箱。 

R: 220 SU-SCORE.ARPA Simple Mail Transfer Service Ready 

S: HELO MIT-MC.ARPA 

R: 250 SU-SCORE.ARPA 

  

S: VRFY Crispin 

R: 250 Mark Crispin <Admin.MRC@SU-SCORE.ARPA> 

  

S: SEND FROM:<EAK@MIT-MC.ARPA> 

R: 250 OK 

  

S: RCPT TO:<Admin.MRC@SU-SCORE.ARPA> 

R: 450 User not active now 

  

S: RSET 

R: 250 OK 

  

S: MAIL FROM:<EAK@MIT-MC.ARPA> 

R: 250 OK 

  

S: RCPT TO:<Admin.MRC@SU-SCORE.ARPA> 

R: 250 OK 

  

S: DATA 

R: 354 Start mail input; end with <CRLF>.<CRLF> 

S: Blah blah blah... 

S: ...etc. etc. etc. 

S: . 

R: 250 OK 

  

S: QUIT 

R: 221 SU-SCORE.ARPA Service closing transmission channel 

  

上述問題的更有效的作法  

R: 220 SU-SCORE.ARPA Simple Mail Transfer Service Ready 

S: HELO MIT-MC.ARPA 

R: 250 SU-SCORE.ARPA 

  

S: VRFY Crispin 

R: 250 Mark Crispin <Admin.MRC@SU-SCORE.ARPA> 

  

S: SOML FROM:<EAK@MIT-MC.ARPA> 

R: 250 OK 

  

S: RCPT TO:<Admin.MRC@SU-SCORE.ARPA> 

R: 250 User not active now, so will do mail. 

  

S: DATA 

R: 354 Start mail input; end with <CRLF>.<CRLF> 

S: Blah blah blah... 

S: ...etc. etc. etc. 

S: . 

R: 250 OK 

  

S: QUIT 

R: 221 SU-SCORE.ARPA Service closing transmission channel 

  

  郵件列表 首先,兩個郵件列表中的每一個在不同主機的不同會話上擴展, 
然,通過轉發主機向列表上的用戶發送郵件。 

第一步:擴展第一個列表 

R: 220 MIT-AI.ARPA Simple Mail Transfer Service Ready 

S: HELO SU-SCORE.ARPA 

R: 250 MIT-AI.ARPA 

  

S: EXPN Example-People 

R: 250-<ABC@MIT-MC.ARPA> 

R: 250-Fred Fonebone <Fonebone@USC-ISIQ.ARPA> 

R: 250-Xenon Y. Zither <XYZ@MIT-AI.ARPA> 

R: 250-Quincy Smith <@USC-ISIF.ARPA:Q-Smith@ISI-VAXA.ARPA> 

R: 250-<joe@foo-unix.ARPA> 

R: 250 <xyz@bar-unix.ARPA> 

  

S: QUIT 

R: 221 MIT-AI.ARPA Service closing transmission channel 

  

第二步:擴展第二個列表  

R: 220 MIT-MC.ARPA Simple Mail Transfer Service Ready  

S: HELO SU-SCORE.ARPA 

R: 250 MIT-MC.ARPA 

  

S: EXPN Interested-Parties 

R: 250-Al Calico <ABC@MIT-MC.ARPA> 

R: 250-<XYZ@MIT-AI.ARPA> 

R: 250-Quincy Smith <@USC-ISIF.ARPA:Q-Smith@ISI-VAXA.ARPA> 

R: 250-<fred@BBN-UNIX.ARPA> 

R: 250 <xyz@bar-unix.ARPA> 

  

S: QUIT 

R: 221 MIT-MC.ARPA Service closing transmission channel 

  

第三步:通過轉發主機向包括兩個列表中的所有用戶發送郵件  

R: 220 USC-ISIE.ARPA Simple Mail Transfer Service Ready 

S: HELO SU-SCORE.ARPA 

R: 250 USC-ISIE.ARPA 

  

S: MAIL FROM:<Account.Person@SU-SCORE.ARPA> 

R: 250 OK 

S: RCPT TO:<@USC-ISIE.ARPA:ABC@MIT-MC.ARPA> 

R: 250 OK 

S: RCPT TO:<@USC-ISIE.ARPA:Fonebone@USC-ISIQA.ARPA> 

R: 250 OK 

S: RCPT TO:<@USC-ISIE.ARPA:XYZ@MIT-AI.ARPA> 

R: 250 OK 

S: RCPT 

TO:<@USC-ISIE.ARPA,@USC-ISIF.ARPA:Q-Smith@ISI-VAXA.ARPA> 

R: 250 OK 

S: RCPT TO:<@USC-ISIE.ARPA:joe@FOO-UNIX.ARPA> 

R: 250 OK 

S: RCPT TO:<@USC-ISIE.ARPA:xyz@BAR-UNIX.ARPA> 

R: 250 OK 

S: RCPT TO:<@USC-ISIE.ARPA:fred@BBN-UNIX.ARPA> 

R: 250 OK 

  

S: DATA 

R: 354 Start mail input; end with <CRLF>.<CRLF> 

S: Blah blah blah... 

S: ...etc. etc. etc. 

S: . 

R: 250 OK 

  

S: QUIT 

R: 221 USC-ISIE.ARPA Service closing transmission channel 


轉發的情況 

R: 220 USC-ISIF.ARPA Simple Mail Transfer Service Ready 

S: HELO LBL-UNIX.ARPA 

R: 250 USC-ISIF.ARPA 

  

S: MAIL FROM:<mo@LBL-UNIX.ARPA> 

R: 250 OK 

  

S: RCPT TO:<fred@USC-ISIF.ARPA> 

R: 251 User not local; will forward to <Jones@USC-ISI.ARPA> 

  

S: DATA 

R: 354 Start mail input; end with <CRLF>.<CRLF> 

S: Blah blah blah... 

S: ...etc. etc. etc. 

S: . 

R: 250 OK 

  

S: QUIT 

R: 221 USC-ISIF.ARPA Service closing transmission channel 

第一步:嘗試第一台主機上的郵箱 

R: 220 USC-ISIF.ARPA Simple Mail Transfer Service Ready 

S: HELO LBL-UNIX.ARPA 

R: 250 USC-ISIF.ARPA 

  

S: MAIL FROM:<mo@LBL-UNIX.ARPA> 

R: 250 OK 

  

S: RCPT TO:<fred@USC-ISIF.ARPA> 

R: 251 User not local; will forward to <Jones@USC-ISI.ARPA> 

  

S: RSET 

R: 250 OK 

  

S: QUIT 

R: 221 USC-ISIF.ARPA Service closing transmission channel 

第二步:嘗試第二台主機上的郵箱 

R: 220 USC-ISI.ARPA Simple Mail Transfer Service Ready 

S: HELO LBL-UNIX.ARPA 

R: 250 USC-ISI.ARPA 

  

S: MAIL FROM:<mo@LBL-UNIX.ARPA> 

R: 250 OK 

  

S: RCPT TO:<Jones@USC-ISI.ARPA> 

R: OK 

  

S: DATA 

R: 354 Start mail input; end with <CRLF>.<CRLF> 

S: Blah blah blah... 

S: ...etc. etc. etc. 

S: . 

R: 250 OK 

  

S: QUIT 

R: 221 USC-ISI.ARPA Service closing transmission channel 

許多接收者的情況 

R: 220 BERKELEY.ARPA Simple Mail Transfer Service Ready 

S: HELO USC-ISIF.ARPA 

R: 250 BERKELEY.ARPA 

  

S: MAIL FROM:<Postel@USC-ISIF.ARPA> 

R: 250 OK 

  

S: RCPT TO:<fabry@BERKELEY.ARPA> 

R: 250 OK 

  

S: RCPT TO:<eric@BERKELEY.ARPA> 

R: 552 Recipient storage full, try again in another transaction 

  

S: DATA 

R: 354 Start mail input; end with <CRLF>.<CRLF> 

S: Blah blah blah... 

S: ...etc. etc. etc. 

S: . 

R: 250 OK 

  

S: MAIL FROM:<Postel@USC-ISIF.ARPA> 

R: 250 OK 

  

S: RCPT TO:<eric@BERKELEY.ARPA> 

R: 250 OK 

  

S: DATA 

R: 354 Start mail input; end with <CRLF>.<CRLF> 

S: Blah blah blah... 

S: ...etc. etc. etc. 

S: . 

R: 250 OK 

S: QUIT 

R: 221 BERKELEY.ARPA Service closing transmission channel 



名詞表: 

<CRLF> 
回車 

<SP> 
空格 

ASCII 
美國標準信息交換碼 

主機 
擁有SMTP進程或郵箱的網絡計算機 

發送SMTP進程 
與接收SMTP進程一起工作的進程。發送SMTP開始傳輸服務連接,它發出 
SMTP命令,接收應答,管理郵件的傳送 

用戶 
希望獲得郵件服務的人(或以人的名義出現的進程),還有就是郵件的接收者。 

會話 
當傳輸信道打開時進行的一系列信息交換 

傳輸服務 
可靠的面向流的數據通信服務。例如:NCP,TCP,NITS。 

傳輸信道 
在發送SMTP和接收SMTP之間建立的全雙工的用交換命令,應答和郵件內容的信道 

字符 
可顯示字符串 

行 
以一個<CRLF>結束的郵件內容 

應答 
接收SMTP對發送SMTP的通過傳輸信道發送的的對某一命令的(成功或不成功的) 
響應。應答的一般格式是應答碼加一段文本。通常情況下,應答碼供機器使用, 
而文本用人類用戶使用 

郵件內容 
一系列的字符串,它們符合ARPA Internet文本信息格式標準的標準字符集 

郵件內容結束標記 
標明郵件內容結束的特定字符 

郵箱 
指定應該向何處發向用戶的信件的地址(字符串)。它通常由用戶名和主機名表示 

命令 
由發送SMTP發送到接收SMTP的要求一個郵件服務操作的請求 

域 
郵件系統中主機地址字符串的層次式表示 

接收SMTP進程 
與發送SMTP進程一起工作的進程。它等待通過傳輸服務建立的連接。它接收發送 
SMTP發出的命令,給出應答並執行相應的操作 

操作 
一個信息由一個接收者發送到另一個或多個接收者的一系列操作 
(http://www.fanqiang.com)
    進入【UNIX論壇

相關文章

======
 

★  樊強制作 歡迎分享  ★