Passa al contenuto principale

5.2. Risposte MTP

Le risposte ai comandi MTP sono concepite per garantire la sincronizzazione di richieste e azioni nel processo di trasferimento della posta e per assicurare che il sender-MTP conosca sempre lo stato del receiver-MTP. Ogni comando deve generare esattamente una risposta. Inoltre, alcuni comandi devono susseguirsi in sequenza, come MRSQ T->MAIL->MRCP o MRSQ R->MRCP->MAIL.

I dettagli della sequenza comando-risposta sono resi espliciti nelle Sezioni 5.3 e 5.4 su sequenza e diagrammi di stato.

Una risposta MTP è costituita da un numero di tre cifre (trasmesso come tre caratteri alfanumerici) seguito da un testo. Il numero è destinato agli automi per determinare in quale stato entrare successivamente; il testo è destinato all'utente umano. L'intento è che le tre cifre contengano informazioni codificate sufficienti perché il sender-MTP non debba esaminare il testo e possa scartarlo oppure passarlo all'utente, a seconda dei casi. In particolare, il testo può dipendere dal ricevente, quindi è probabile che vi siano testi diversi per ciascun codice di risposta. Un'ulteriore spiegazione dell'assegnazione dei codici di risposta è fornita nell'Appendice E sulla teoria dei codici di risposta. Formalmente, una risposta è definita come la sequenza: un codice di tre cifre, <SP>, una riga di testo e <CRLF>.

5.2.1. Codici di risposta per gruppi funzionali​

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. Elenco dei codici di risposta in ordine numerico​

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]