Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ClassSuccess specifies that the DSN is reporting a positive delivery // action. Detail sub-codes may provide notification of // transformations required for delivery. ClassSuccess = 2 // ClassTransientFailure - a persistent transient failure is one in which the message as // sent is valid, but persistence of some temporary condition has // caused abandonment or delay of attempts to send the message. // If this code accompanies a delivery failure report, sending in // the future may be successful. ClassTransientFailure = 4 // ClassPermanentFailure - a permanent failure is one which is not likely to be resolved // by resending the message in the current form. Some change to // the message or the destination must be made for successful // delivery. ClassPermanentFailure = 5 )
View Source
const ( OtherStatus = ".0.0" OtherAddressStatus = ".1.0" BadDestinationMailboxAddress = ".1.1" BadDestinationSystemAddress = ".1.2" BadDestinationMailboxAddressSyntax = ".1.3" DestinationMailboxAddressAmbiguous = ".1.4" DestinationMailboxAddressValid = ".1.5" MailboxHasMoved = ".1.6" BadSendersMailboxAddressSyntax = ".1.7" BadSendersSystemAddress = ".1.8" OtherOrUndefinedMailboxStatus = ".2.0" MailboxDisabled = ".2.1" MailboxFull = ".2.2" MessageLengthExceedsAdministrativeLimit = ".2.3" MailingListExpansionProblem = ".2.4" OtherOrUndefinedMailSystemStatus = ".3.0" MailSystemFull = ".3.1" SystemNotAcceptingNetworkMessages = ".3.2" SystemNotCapableOfSelectedFeatures = ".3.3" MessageTooBigForSystem = ".3.4" OtherOrUndefinedNetworkOrRoutingStatus = ".4.0" NoAnswerFromHost = ".4.1" BadConnection = ".4.2" RoutingServerFailure = ".4.3" UnableToRoute = ".4.4" NetworkCongestion = ".4.5" RoutingLoopDetected = ".4.6" DeliveryTimeExpired = ".4.7" OtherOrUndefinedProtocolStatus = ".5.0" InvalidCommand = ".5.1" SyntaxError = ".5.2" TooManyRecipients = ".5.3" InvalidCommandArguments = ".5.4" WrongProtocolVersion = ".5.5" OtherOrUndefinedMediaError = ".6.0" MediaNotSupported = ".6.1" ConversionRequiredAndProhibited = ".6.2" ConversionRequiredButNotSupported = ".6.3" ConversionWithLossPerformed = ".6.4" ConversionFailed = ".6.5" )
DefaultMap contains defined default codes (RfC 3463)
View Source
const SP = " "
space char
Variables ¶
View Source
var ErrorRelayDenied = &response{ enhancedCode: BadDestinationMailboxAddress, basicCode: 454, class: ClassTransientFailure, comment: "GetError: Relay access denied:", }
View Source
var ErrorShutdown = &response{ enhancedCode: OtherOrUndefinedMailSystemStatus, basicCode: 421, class: ClassTransientFailure, comment: "Server is shutting down. Please try again later. Sayonara!", }
View Source
var ErrorTooManyRecipients = &response{ enhancedCode: TooManyRecipients, basicCode: 452, class: ClassTransientFailure, comment: "Too many recipients", }
View Source
var FailBackendNotRunning = &response{ enhancedCode: OtherOrUndefinedProtocolStatus, basicCode: 554, class: ClassPermanentFailure, comment: "Transaction failed - backend not running", }
View Source
var FailBackendTimeout = &response{ enhancedCode: OtherOrUndefinedProtocolStatus, basicCode: 554, class: ClassPermanentFailure, comment: "GetError: transaction timeout", }
View Source
var FailBackendTransaction = &response{ enhancedCode: OtherOrUndefinedProtocolStatus, basicCode: 554, class: ClassPermanentFailure, comment: "GetError:", }
View Source
var FailCommandNotImplemented = &response{ enhancedCode: InvalidCommand, basicCode: 502, class: ClassPermanentFailure, comment: "Command not implemented", }
View Source
var FailDomainTooLong = &response{ enhancedCode: InvalidCommandArguments, basicCode: 550, class: ClassPermanentFailure, comment: "Domain cannot exceed 255 characters", }
View Source
var FailInvalidAddress = &response{ enhancedCode: InvalidCommandArguments, basicCode: 501, class: ClassPermanentFailure, comment: "Invalid address", }
View Source
var FailLineTooLong = &response{ enhancedCode: InvalidCommand, basicCode: 554, class: ClassPermanentFailure, comment: "Line too long.", }
View Source
var FailLocalPartTooLong = &response{ enhancedCode: InvalidCommandArguments, basicCode: 550, class: ClassPermanentFailure, comment: "Local part too long, cannot exceed 64 characters", }
View Source
var FailMailCmd = &response{ enhancedCode: BadDestinationMailboxAddress, basicCode: 550, class: ClassPermanentFailure, comment: "User unknown in local recipient table", }
View Source
var FailMaxUnrecognizedCmd = &response{ enhancedCode: InvalidCommand, basicCode: 554, class: ClassPermanentFailure, comment: "Too many unrecognized commands", }
View Source
var FailMessageSizeExceeded = &response{ enhancedCode: OtherOrUndefinedNetworkOrRoutingStatus, basicCode: 552, class: ClassPermanentFailure, comment: "GetError:", }
View Source
var FailNestedMailCmd = &response{ enhancedCode: InvalidCommand, basicCode: 503, class: ClassPermanentFailure, comment: "GetError: nested MAIL command", }
View Source
var FailNoRecipientsDataCmd = &response{ enhancedCode: InvalidCommand, basicCode: 503, class: ClassPermanentFailure, comment: "GetError: No recipients", }
View Source
var FailNoSenderDataCmd = &response{ enhancedCode: InvalidCommand, basicCode: 503, class: ClassPermanentFailure, comment: "GetError: No sender", }
View Source
var FailPathTooLong = &response{ enhancedCode: InvalidCommandArguments, basicCode: 550, class: ClassPermanentFailure, comment: "Path too long", }
View Source
var FailRcptCmd = &response{ enhancedCode: BadDestinationMailboxAddress, basicCode: 550, class: ClassPermanentFailure, comment: "User unknown in local recipient table", }
View Source
var FailReadErrorDataCmd = &response{ enhancedCode: OtherOrUndefinedMailSystemStatus, basicCode: 451, class: ClassTransientFailure, comment: "GetError:", }
View Source
var FailReadLimitExceededDataCmd = &response{ enhancedCode: MessageLengthExceedsAdministrativeLimit, basicCode: 550, class: ClassPermanentFailure, comment: "GetError:", }
View Source
var FailSyntaxError = &response{ enhancedCode: SyntaxError, basicCode: 550, class: ClassPermanentFailure, comment: "Syntax error", }
View Source
var FailUnrecognizedCmd = &response{ enhancedCode: InvalidCommand, basicCode: 554, class: ClassPermanentFailure, comment: "Unrecognized command", }
View Source
var RejectedRcptCmd = &response{ enhancedCode: InvalidCommandArguments, basicCode: 553, class: ClassPermanentFailure, comment: "Recipient address rejected: Access denied", }
View Source
var RejectedSenderMailCmd = &response{ enhancedCode: InvalidCommandArguments, basicCode: 553, class: ClassPermanentFailure, comment: "Sender address rejected: Access denied", }
View Source
var SuccessDataCmd = &response{
basicCode: 354,
comment: "354 Enter message, ending with '.' on a line by itself",
}
View Source
var SuccessMailCmd = &response{ enhancedCode: OtherAddressStatus, class: ClassSuccess, }
View Source
var SuccessMessageAccepted = &response{ enhancedCode: OtherStatus, basicCode: 250, class: ClassSuccess, comment: "Message accepted", }
View Source
var SuccessMessageQueued = &response{ enhancedCode: OtherStatus, basicCode: 250, class: ClassSuccess, comment: "OK: queued", }
View Source
var SuccessNoopCmd = &response{ enhancedCode: OtherStatus, class: ClassSuccess, }
View Source
var SuccessQuitCmd = &response{ enhancedCode: OtherStatus, basicCode: 221, class: ClassSuccess, comment: "Bye", }
View Source
var SuccessRcptCmd = &response{ enhancedCode: DestinationMailboxAddressValid, class: ClassSuccess, }
View Source
var SuccessResetCmd = SuccessMailCmd
View Source
var SuccessStartTLSCmd = &response{ enhancedCode: OtherStatus, basicCode: 220, class: ClassSuccess, comment: "Ready to start TLS", }
View Source
var SuccessVerifyCmd = &response{ enhancedCode: OtherOrUndefinedProtocolStatus, basicCode: 252, class: ClassSuccess, comment: "Cannot verify user", }
Functions ¶
This section is empty.
Types ¶
type EnhancedStatusCode ¶
type EnhancedStatusCode struct {
Class class
SubjectDetailCode subjectDetail
}
EnhancedStatus are the ones that look like 2.1.0
func (EnhancedStatusCode) String ¶
func (e EnhancedStatusCode) String() string
String returns a string representation of EnhancedStatus
Click to show internal directories.
Click to hide internal directories.