+
+
+
+
+
+char *smtpcodes[][2] = {
+ { "211 - System status / system help reply" },
+ { "214", "Help message" },
+ { "220", "Domain service ready" },
+ { "221", "Domain service closing transmission channel" },
+ { "250", "Requested mail action completed and OK" },
+ { "251", "Not Local User, forward email to forward path" },
+ { "252", "Cannot Verify user, will attempt delivery later" },
+ { "253", "Pending messages for node started" },
+ { "354", "Start mail input; end with ." },
+ { "355", "Octet-offset is the transaction offset" },
+ { "421", "Domain service not available, closing transmission channel" },
+ { "432", "Domain service not available, closing transmission channel" },
+ { "450", "Requested mail action not taken: mailbox unavailable. request refused" },
+ { "451", "Requested action aborted: local error in processing Request is unable to be processed, try again" },
+ { "452", "Requested action not taken: insufficient system storage" },
+ { "453", "No mail" },
+ { "454", "TLS not available due to temporary reason. Encryption required for requested authentication mechanism" },
+ { "458", "Unable to queue messages for node" },
+ { "459", "Node not allowed: reason" },
+ { "500", "Syntax error, command unrecognized" },
+ { "501", "Syntax error in parameters or arguments" },
+ { "502", "Command not implemented" },
+ { "503", "Bad sequence of commands" },
+ { "504", "Command parameter not implemented" },
+ { "510", "Check the recipient address" },
+ { "512", "Domain can not be found. Unknown host." },
+ { "515", "Destination mailbox address invalid" },
+ { "517", "Problem with senders mail attribute, check properties" },
+ { "521", "Domain does not accept mail" },
+ { "522", "Recipient has exceeded mailbox limit" },
+ { "523", "Server limit exceeded. Message too large" },
+ { "530", "Access Denied. Authentication required" },
+ { "531", "Mail system Full" },
+ { "533", "Remote server has insufficient disk space to hold email" },
+ { "534", "Authentication mechanism is too weak. Message too big" },
+ { "535", "Multiple servers using same IP. Required Authentication" },
+ { "538", "Encryption required for requested authentication mechanism" },
+ { "540", "Email address has no DNS Server" },
+ { "541", "No response from host" },
+ { "542", "Bad Connection" },
+ { "543", "Routing server failure. No available route" },
+ { "546", "Email looping" },
+ { "547", "Delivery time-out" },
+ { "550", "Requested action not taken: mailbox unavailable or relaying denied" },
+ { "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" },
+ { "554", "Transaction failed" }
+};
+
+
+
+char *smtpstatus(int code) {
+ int i;
+
+ for (i=0; i<(sizeof(smtpcodes)/sizeof(char *)/2); ++i) {
+ if (atoi(smtpcodes[i][0]) == code) {
+ return(smtpcodes[i][1]);
+ }
+ }
+
+ return("Unknown or other SMTP status");
+}
+