Bugfix: a misguided change to the .forward macro expansion
filter broke .forward file lookup.
+ Bugfix: missing defer_if_permit test in smtpd_data_restrictions.
+ Victor Duchovni. File: smtpd/smtpd_check.c.
+
+20021112
+
+ Robustness: increase the mime_nesting_limit from 20 to 100,
+ so that bounces can't loop. Each bounces increases the MIME
+ nesting level by one. Ralf Hildebrandt and Victor Duchovni.
+
+20021113
+
+ Robustness: reinstated SMTP client command flushing to
+ avoid pipeline stalls. File: smtp/smtp_chat.c.
+
+20021114
+
+ Robustness: distinguish between timeout and "lost connection"
+ when the SMTP server is unable to send a reply to the remote
+ client. File: smtpd/smtpd_chat.c.
+
Open problems:
Low: revise other local delivery agent duplicate filters.
# The unknown_client_reject_code parameter specifies the SMTP server
# response when a client without address to name mapping violates
-# the reject_unknown_clients restriction.
+# the reject_unknown_client restriction.
#
# Do not change this unless you have a complete understanding of RFC 821.
#
input. For example, to delete all mail from or to
<b>user@example.com</b>:
- mailq | awk 'BEGIN { RS = "" } \
+ mailq | tail +2 | awk 'BEGIN { RS = "" } \
/ user@example\.com$/ { print $1 } \
' | tr -d '*!' | postsuper -d -
<a name="reject_unknown_client">
<dt> <b>reject_unknown_client</b> <dd> Reject the request when the
-client IP address has no PTR record in the DNS. The
-<b>unknown_client_reject_code</b> parameter specifies the response
-code to rejected requests (default: <b>450</b>).
+client IP address has no PTR (address to name) record in the DNS,
+or when the PTR record does not have a matching A (name to address)
+record. The <b>unknown_client_reject_code</b> parameter specifies
+the response code to rejected requests (default: <b>450</b>).
<p>
queue IDs from standard input. For example, to delete all mail
from or to \fBuser@example.com\fR:
.sp
-mailq | awk \'BEGIN { RS = "" } \e
+mailq | tail +2 | awk \'BEGIN { RS = "" } \e
.ti +4
/ user@example\e.com$/ { print $1 } \e
.br
* MIME support.
*/
#define VAR_MIME_MAXDEPTH "mime_nesting_limit"
-#define DEF_MIME_MAXDEPTH 20
+#define DEF_MIME_MAXDEPTH 100
extern int var_mime_maxdepth;
#define VAR_MIME_BOUND_LEN "mime_boundary_length_limit"
* Patches change the patchlevel and the release date. Snapshots change the
* release date only, unless they include the same bugfix as a patch release.
*/
-#define MAIL_RELEASE_DATE "20021109"
+#define MAIL_RELEASE_DATE "20021114"
#define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE
/* queue IDs from standard input. For example, to delete all mail
/* from or to \fBuser@example.com\fR:
/* .sp
-/* mailq | awk \'BEGIN { RS = "" } \e
+/* mailq | tail +2 | awk \'BEGIN { RS = "" } \e
/* .ti +4
/* / user@example\e.com$/ { print $1 } \e
/* .br
* Send the command to the SMTP server.
*/
smtp_fputs(STR(state->buffer), LEN(state->buffer), session->stream);
+
+ /*
+ * Flush unsent data to avoid timeouts after slow DNS lookups.
+ */
+ if (time((time_t *) 0) - vstream_ftime(session->stream) > 10)
+ vstream_fflush(session->stream);
+
+ /*
+ * Abort immediately if the connection is broken.
+ */
+ if (vstream_ftimeout(session->stream))
+ vstream_longjmp(session->stream, SMTP_ERR_TIME);
+ if (vstream_ferror(session->stream))
+ vstream_longjmp(session->stream, SMTP_ERR_EOF);
}
/* smtp_chat_resp - read and process SMTP server response */
/*
* Abort immediately if the connection is broken.
*/
+ if (vstream_ftimeout(state->client))
+ vstream_longjmp(state->client, SMTP_ERR_TIME);
if (vstream_ferror(state->client))
vstream_longjmp(state->client, SMTP_ERR_EOF);
}
}
/*
- * Reset the defer_if_permit flag. This should not be necessary but we do
- * it just in case.
+ * Reset the defer_if_permit flag. This is necessary when some recipients
+ * were accepted but the last one was rejected.
*/
state->defer_if_permit.active = 0;
if (status == 0 && data_restrctions->argc)
status = generic_checks(state, data_restrctions,
"DATA", SMTPD_NAME_DATA, NO_DEF_ACL);
+
+ /*
+ * Force permission into deferral when some earlier temporary error may
+ * have prevented us from rejecting mail, and report the earlier problem.
+ */
+ if (status != SMTPD_CHECK_REJECT && state->defer_if_permit.active)
+ status = smtpd_check_reject(state, state->defer_if_permit.class,
+ "%s", STR(state->defer_if_permit.reason));
+
if (state->rcpt_count > 1)
state->recipient = saved_recipient;