Scenarios This section presents complete scenarios of several types of SMTP sessions. A Typical SMTP Transaction Scenario This SMTP example shows mail sent by Smith at host USC-ISIF, to Jones, Green, and Brown at host BBN-UNIX. Here we assume that host USC-ISIF contacts host BBN-UNIX directly. The mail is accepted for Jones and Brown. Green does not have a mailbox at host BBN-UNIX. ------------------------------------------------------------- R: 220 BBN-UNIX.ARPA Simple Mail Transfer Service Ready S: HELO USC-ISIF.ARPA R: 250 BBN-UNIX.ARPA S: MAIL FROM: R: 250 OK S: RCPT TO: R: 250 OK S: RCPT TO: R: 550 No such user here S: RCPT TO: R: 250 OK S: DATA R: 354 Start mail input; end with . S: Blah blah blah... S: ...etc. etc. etc. S: . R: 250 OK S: QUIT R: 221 BBN-UNIX.ARPA Service closing transmission channel Relayed Mail Scenario ------------------------------------------------------------- Step 1 -- Source Host to Relay Host R: 220 USC-ISIE.ARPA Simple Mail Transfer Service Ready S: HELO MIT-AI.ARPA R: 250 USC-ISIE.ARPA S: MAIL FROM: R: 250 OK S: RCPT TO:<@USC-ISIE.ARPA:Jones@BBN-VAX.ARPA> R: 250 OK S: DATA R: 354 Start mail input; end with . S: Date: 2 Nov 81 22:33:44 S: From: John Q. Public 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 Step 2 -- Relay Host to Destination Host 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: R: 250 OK S: DATA R: 354 Start mail input; end with . 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 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 ------------------------------------------------------------------------- [2000 Oct 27] lilac で試したところ MAIL FROM:<> 250 Ok RCPT TO: 250 Ok DATA 354 End data with . Subject: test6 From: kon test6 . 250 Ok: queued as D33F57FEA で送れた。 つまり, HELO 無し, MAIL FROM の中身無しでも。(もちろん適当に入れてもOKだった。) # この場合,From ヘッダは無しで送信された。 # DATA の空行は,ヘッダと本文のセパレータなので, # From: kon は本文となる。 From ヘッダが無い場合は MAIL FROM の中身が代わりに使われるようだ。 To ヘッダが無くても RCPT TO が代わりに使われることはないようだが。 一般に普及しているメールソフトでは MAIL FROM は何を入れているのか?