/*++ /* NAME /* smtp_trouble 3 /* SUMMARY /* error handler policies /* SYNOPSIS /* #include "smtp.h" /* /* int smtp_sess_fail(state) /* SMTP_STATE *state; /* /* int smtp_site_fail(state, mta_name, resp, format, ...) /* SMTP_STATE *state; /* const char *mta_name; /* SMTP_RESP *resp; /* const char *format; /* /* int smtp_mesg_fail(state, mta_name, resp, format, ...) /* SMTP_STATE *state; /* const char *mta_name; /* SMTP_RESP *resp; /* const char *format; /* /* void smtp_rcpt_fail(state, recipient, mta_name, resp, format, ...) /* SMTP_STATE *state; /* RECIPIENT *recipient; /* const char *mta_name; /* SMTP_RESP *resp; /* const char *format; /* /* int smtp_stream_except(state, exception, description) /* SMTP_STATE *state; /* int exception; /* const char *description; /* AUXILIARY FUNCTIONS /* int smtp_misc_fail(state, flags, mta_name, resp, format, ...) /* SMTP_STATE *state; /* int flags; /* const char *mta_name; /* SMTP_RESP *resp; /* const char *format; /* DESCRIPTION /* This module handles all non-fatal errors that can happen while /* attempting to deliver mail via SMTP, and implements the policy /* of how to deal with the error. Depending on the nature of /* the problem, delivery of a single message is deferred, delivery /* of all messages to the same domain is deferred, or one or more /* recipients are given up as non-deliverable and a bounce log is /* updated. In any case, the recipient is marked as either KEEP /* (try again with a backup host) or DROP (delete recipient from /* delivery request). /* /* In addition, when an unexpected response code is seen such /* as 3xx where only 4xx or 5xx are expected, or any error code /* that suggests a syntax error or something similar, the /* protocol error flag is set so that the postmaster receives /* a transcript of the session. No notification is generated for /* what appear to be configuration errors - very likely, they /* would suffer the same problem and just cause more trouble. /* /* In case of a soft error, action depends on whether the error /* qualifies for trying the request with other mail servers (log /* an informational record only and try a backup server) or /* whether this is the final server (log recipient delivery status /* records and delete the recipient from the request). /* /* smtp_sess_fail() takes a pre-formatted error report after /* failure to complete some protocol handshake. The policy is /* as with smtp_site_fail(). /* /* smtp_site_fail() handles the case where the program fails to /* complete the initial handshake: the server is not reachable, /* is not running, does not want talk to us, or we talk to ourselves. /* The \fIcode\fR gives an error status code; the \fIformat\fR /* argument gives a textual description. /* The policy is: soft error, non-final server: log an informational /* record why the host is being skipped; soft error, final server: /* defer delivery of all remaining recipients and mark the destination /* as problematic; hard error: bounce all remaining recipients. /* The session is marked as "do not cache". /* The result is non-zero. /* /* smtp_mesg_fail() handles the case where the smtp server /* does not accept the sender address or the message data, /* or when the local MTA is unable to convert the message data. /* The policy is: soft error, non-final server: log an informational /* record why the host is being skipped; soft error, final server: /* defer delivery of all remaining recipients; hard error: bounce all /* remaining recipients. /* The result is non-zero. /* /* smtp_misc_fail() provides a more detailed interface than /* smtp_site_fail() and smtp_mesg_fail(), which are convenience /* wrappers around smtp_misc_fail(). See the flags argument below. /* /* smtp_rcpt_fail() handles the case where a recipient is not /* accepted by the server for reasons other than that the server /* recipient limit is reached. /* The policy is: soft error, non-final server: log an informational /* record why the recipient is being skipped; soft error, final server: /* defer delivery of this recipient; hard error: bounce this /* recipient. /* /* smtp_stream_except() handles the exceptions generated by /* the smtp_stream(3) module (i.e. timeouts and I/O errors). /* The \fIexception\fR argument specifies the type of problem. /* The \fIdescription\fR argument describes at what stage of /* the SMTP dialog the problem happened. /* The policy is: non-final server: log an informational record /* with the reason why the host is being skipped; final server: /* defer delivery of all remaining recipients. /* Retry plaintext delivery after TLS post-handshake session /* failure, provided that at least one recipient was not /* deferred or rejected during the TLS phase, and that global /* preconditions for plaintext fallback are met. /* The session is marked as "do not cache". /* The result is non-zero. /* /* Arguments: /* .IP state /* SMTP client state per delivery request. /* .IP flags /* Either SMTP_MISC_FAIL_NONE or the bitwise OR of /* .RS /* .IP SMTP_MISC_FAIL_THROTTLE /* Mark the destination as problematic. /* .IP SMTP_MISC_FAIL_SOFT_NON_FINAL /* If the server was not the last one to try, treat a hard error /* as a soft error. /* .IP SMTP_MISC_FAIL_DONT_CACHE /* Do not save the connection to the cache. This flag is ignored /* when SMTP_MISC_FAIL_THROTTLE is in effect. /* .IP resp /* Server response including reply code and text. /* .IP recipient /* Undeliverable recipient address information. /* .IP format /* Human-readable description of why mail is not deliverable. /* DIAGNOSTICS /* Panic: unknown exception code. /* SEE ALSO /* smtp_proto(3) smtp high-level protocol /* smtp_stream(3) smtp low-level protocol /* defer(3) basic message defer interface /* bounce(3) basic message bounce interface /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.