5.2. MTP 応答
MTP コマンドへの応答は、メール転送の過程における要求と動作の同期を確保し、送信側 MTP が常に受信側 MTP の状態を把握できるようにするために考案されている。すべてのコマンドは、ちょうど 1 つの応答を生成しなければならない。加えて、MRSQ T->MAIL->MRCP や MRSQ R->MRCP->MAIL のように、一部のコマンドは順番に発行されなければならない。
コマンドと応答のシーケンスの詳細は、シーケンスと状態遷移図を扱う第 5.3 節と第 5.4 節で明示する。
MTP 応答は、3 桁の数字 (3 つの英数字として伝送される) に続くテキストからなる。数字は、自動機械が次にどの状態へ入るかを決めるために使うことを意図しており、テキストは人間のユーザーに向けたものである。3 桁の数字には、送信側 MTP がテキストを調べる必要がなく、適宜それを捨てるか、ユーザーに渡せるだけの符号化された情報が含まれることが意図されている。特に、テキストは受信側に依存しうるため、応答コードごとにさまざまなテキストがありうる。応答コードの割り当てに関するさらなる説明は、応答コードの理論に関する付録 E に示す。形式的には、応答は 3 桁のコード、<SP>、テキスト 1 行、<CRLF> の並びとして定義される。
5.2.1. 機能グループ別の応答コード
200 Command okay
201 Command okay, action aborted
500 Syntax error, command unrecognized
[This may include errors such as command line too long]
501 Syntax error in parameters or arguments
502 Command not implemented
503 Bad sequence of commands
504 Command parameter not implemented
211 System status, or system help reply
214 Help message
[Information on how to use the receiver or the meaning of a
particular non-standard command; this reply is useful only
to the human user]
215 <scheme> is the preferred scheme
120 <host> Service ready in nnn minutes
220 <host> Service ready for new user
221 <host> Service closing transmission channel
421 <host> Service not available, closing transmission channel
[This may be a reply to any command if the service knows it
must shut down]
151 User not local; will forward to <user>@<host>
152 User unknown; mail will be forwarded by the operator
250 Requested mail action okay, completed
450 Requested mail action not taken: mailbox unavailable
[E.g., mailbox busy]
550 Requested action not taken: mailbox unavailable
[E.g., mailbox not found, no access]
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
552 Requested mail action aborted: exceeded storage allocation
[For current mailbox location]
553 Requested action not taken: mailbox name not allowed
[E.g., mailbox syntax incorrect]
354 Start mail input; end with <CRLF>.<CRLF>
5.2.2. 数値順の応答コード一覧
120 <host> Service ready in nnn minutes
151 User not local; will forward to <user>@<host>
152 User unknown; mail will be forwarded by the operator
200 Command okay
201 Command okay, action aborted
211 System status, or system help reply
214 Help message
[Information on how to use the receiver or the meaning of a
particular non-standard command; this reply is useful only
to the human user]
215 <scheme> is the preferred scheme
220 <host> Service ready for new user
221 <host> Service closing transmission channel
250 Requested mail action okay, completed
354 Start mail input; end with <CRLF>.<CRLF>
421 <host> Service not available, closing transmission channel
[This may be a reply to any command if the service knows it
must shut down]
450 Requested mail action not taken: mailbox unavailable
[E.g., mailbox busy]
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognized
[This may include errors such as command line too long]
501 Syntax error in parameters or arguments
502 Command not implemented
503 Bad sequence of commands
504 Command parameter not implemented
550 Requested action not taken: mailbox unavailable
[E.g., mailbox not found, no access]
552 Requested mail action aborted: exceeded storage allocation
[For current mailbox location]
553 Requested action not taken: mailbox name not allowed
[E.g., mailbox syntax incorrect]