Zum Hauptinhalt springen

4.2. SMTP-Antworten

Antworten auf SMTP-Befehle dienen dazu, die Synchronisation von Anforderungen und Aktionen im Verlauf der Mail-Übertragung sicherzustellen und zu gewährleisten, dass der Sender-SMTP stets den Zustand des Empfänger-SMTP kennt. Jeder Befehl muss genau eine Antwort erzeugen.

Die Einzelheiten der Abfolge von Befehlen und Antworten sind in Abschnitt 5.3 (Abfolge) und Abschnitt 5.4 (Zustandsdiagramme) ausgeführt.

Eine SMTP-Antwort besteht aus einer dreistelligen Zahl (übertragen als drei alphanumerische Zeichen), gefolgt von etwas Text. Die Zahl ist für die Verwendung durch Automaten gedacht, um zu bestimmen, welchen Zustand sie als Nächstes einnehmen; der Text ist für den menschlichen Benutzer bestimmt. Die drei Ziffern sollen genügend kodierte Informationen enthalten, sodass der Sender-SMTP den Text nicht auswerten muss und ihn je nach Bedarf entweder verwerfen oder an den Benutzer weitergeben kann. Insbesondere kann der Text empfängerabhängig und kontextabhängig sein, sodass für jeden Antwortcode wahrscheinlich unterschiedliche Texte vorkommen. Eine Erörterung der Theorie der Antwortcodes enthält Anhang E. Formal ist eine Antwort definiert als die Folge: ein dreistelliger Code, <SP>, eine Textzeile und <CRLF>, oder eine mehrzeilige Antwort (wie in Anhang E definiert). Im Normalfall ist zu erwarten, dass nur die Befehle EXPN und HELP mehrzeilige Antworten ergeben; mehrzeilige Antworten sind jedoch für jeden Befehl zulässig.

4.2.1. Antwortcodes nach Funktionsgruppen​

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]

220 <domain> Service ready
221 <domain> Service closing transmission channel
421 <domain> Service not available,
closing transmission channel
[This may be a reply to any command if the service knows it
must shut down]

250 Requested mail action okay, completed
251 User not local; will forward to <forward-path>
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: error in processing
551 User not local; please try <forward-path>
452 Requested action not taken: insufficient system storage
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed
[E.g., mailbox syntax incorrect]
354 Start mail input; end with <CRLF>.<CRLF>
554 Transaction failed

4.2.2. Liste der Antwortcodes in numerischer Reihenfolge​

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]
220 <domain> Service ready
221 <domain> Service closing transmission channel
250 Requested mail action okay, completed
251 User not local; will forward to <forward-path>

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

421 <domain> 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]
551 User not local; please try <forward-path>
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed
[E.g., mailbox syntax incorrect]
554 Transaction failed