5.2. Réponses MTP
Les réponses aux commandes MTP sont conçues pour assurer la synchronisation des demandes et des actions au cours du transfert de courrier, et pour garantir que le MTP émetteur connaît toujours l'état du MTP récepteur. Chaque commande doit générer exactement une réponse. De plus, certaines commandes doivent se succéder dans un ordre précis, comme MRSQ T->MAIL->MRCP ou MRSQ R->MRCP->MAIL.
Les détails de la séquence commande-réponse sont explicités aux sections 5.3 et 5.4 sur l'enchaînement et les diagrammes d'états.
Une réponse MTP se compose d'un nombre à trois chiffres (transmis sous forme de trois caractères alphanumériques) suivi d'un texte. Le nombre est destiné aux automates pour déterminer l'état suivant à adopter ; le texte est destiné à l'utilisateur humain. L'intention est que les trois chiffres contiennent suffisamment d'informations codées pour que le MTP émetteur n'ait pas besoin d'examiner le texte et puisse soit l'ignorer, soit le transmettre à l'utilisateur, selon le cas. En particulier, le texte peut dépendre du récepteur, de sorte qu'il y aura vraisemblablement des textes variables pour chaque code de réponse. Une explication plus détaillée de l'attribution des codes de réponse est donnée à l'annexe E sur la théorie des codes de réponse. Formellement, une réponse est définie comme la séquence : un code à trois chiffres, <SP>, une ligne de texte et <CRLF>.
5.2.1. Codes de réponse par groupes fonctionnels
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. Liste des codes de réponse par ordre numérique
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]