diff options
| author | Shulhan <ms@kilabit.info> | 2022-02-18 13:37:12 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-02-18 13:37:12 +0700 |
| commit | aec0fb93d2e20aa486bbb27c6586615f9ab5de64 (patch) | |
| tree | 0ce6bd793758bebacccc2847624e7d02d0a9012a | |
| parent | c50c628d94c1d286e1620f04356db8c565765185 (diff) | |
| download | pakakeh.go-aec0fb93d2e20aa486bbb27c6586615f9ab5de64.tar.xz | |
lib/smtp: add status codes from RFC 4954
The following status codes are added,
* 432: StatusPasswordTransitionNeeded, from section 4.7.12.
* 454: StatusTemporaryAuthFailure, from section 4.7.0.
* 534: StatusAuthMechanismTooWeak, from section 5.7.9.
| -rw-r--r-- | lib/smtp/smtp.go | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/smtp/smtp.go b/lib/smtp/smtp.go index 072f3b66..6674604f 100644 --- a/lib/smtp/smtp.go +++ b/lib/smtp/smtp.go @@ -56,11 +56,13 @@ const ( // (that is, the command is repeated identically and the receiver // does not put up a new implementation). // - StatusShuttingDown = 421 - StatusMailboxUnavailable = 450 - StatusLocalError = 451 - StatusNoStorage = 452 - StatusParameterUnprocessable = 455 + StatusShuttingDown = 421 + StatusPasswordTransitionNeeded = 432 // RFC 4954 section 4.7.12. + StatusMailboxUnavailable = 450 + StatusLocalError = 451 + StatusNoStorage = 452 + StatusTemporaryAuthFailure = 454 // RFC 4954 section 4.7.0. + StatusParameterUnprocessable = 455 // // 5xx indicate permanent failure. @@ -73,16 +75,17 @@ const ( // the future (e.g., after the spelling has been changed, or the user // has altered the account status). // - StatusCmdUnknown = 500 // RFC 5321, section 4.2.4. - StatusCmdTooLong = 500 // RFC 5321, section 4.3.2. + StatusCmdUnknown = 500 // RFC 5321 section 4.2.4. + StatusCmdTooLong = 500 // RFC 5321 section 4.3.2, RFC 4954 section 5.5.6. StatusCmdSyntaxError = 501 - StatusCmdNotImplemented = 502 // RFC 5321, section 4.2.4. + StatusCmdNotImplemented = 502 // RFC 5321 section 4.2.4. StatusCmdBadSequence = 503 StatusParamUnimplemented = 504 StatusNotAuthenticated = 530 - StatusInvalidCredential = 535 + StatusAuthMechanismTooWeak = 534 // RFC 4954 section 5.7.9. + StatusInvalidCredential = 535 // RFC 4954 section 5.7.8. StatusMailboxNotFound = 550 - StatusAddressChangeAborted = 551 // RFC 5321, section 3.4. + StatusAddressChangeAborted = 551 // RFC 5321 section 3.4. StatusMailNoStorage = 552 StatusMailboxIncorrect = 553 StatusTransactionFailed = 554 |
