of mail probes, so it will no longer block for in_flow_delay
seconds when mail arrives faster than it is delivered.
Still need to make mail_stream_finish() asynchronous in
- order to avoid blocking for trigger_timeout seconds when the
- queue manager is overwhelmed. Files: global/post_mail.c,
+ order to avoid blocking for trigger_timeout seconds when
+ the queue manager is overwhelmed. Files: global/post_mail.c,
verify/verify.c.
Bugfix: removed extraneous sleep() after the last attempt
Bugfix: the stricter postdrop input filter broke "sendmail
-bs". Found by Lutz Jaenicke. File: smtpd/smtpd.c.
+20030618
+
+ After "postfix reload", the master daemon now warns when
+ inet_interfaces has changed, and ignores the change, instead
+ of passing incorrect information to the smtp server. File:
+ master/master_ent.c.
+
+20030620
+
+ Bugfix: after the last change to postdrop, postcat no longer
+ recognized maildrop files as valid. File: postcat/postcat.c.
+
+ Bugfix: after moving "sendmail -t" address extraction to
+ sendmail, "-t" broke multi-line recipient headers. Victor
+ Duchovni, Morgan Stanley. File: sendmail/sendmail.c.
+
Open problems:
Low: smtp-source may block when sending large test messages.
* 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 "20030611"
+#define MAIL_RELEASE_DATE "20030621"
#define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "2.0.12-" MAIL_RELEASE_DATE
int n;
char *bufp;
char *atmp;
+ static char *saved_interfaces = 0;
if (master_fp == 0)
msg_panic("get_master_ent: config file not open");
+ /*
+ * XXX We cannot change the inet_interfaces setting for a running master
+ * process. Listening sockets are inherited by child processes so that
+ * closing and reopening those sockets in the master does not work.
+ *
+ * Another problem is that library routines still cache results that are
+ * based on the old inet_interfaces setting. It is too much trouble to
+ * recompute everything.
+ *
+ * In order to keep our data structures consistent we ignore changes in
+ * inet_interfaces settings, and issue a warning instead.
+ */
+ if (saved_interfaces == 0)
+ saved_interfaces = mystrdup(var_inet_interfaces);
+
/*
* Skip blank lines and comment lines.
*/
transport = get_str_ent(&bufp, "transport type", (char *) 0);
if (STR_SAME(transport, MASTER_XPORT_NAME_INET)) {
+ if (!STR_SAME(saved_interfaces, var_inet_interfaces)) {
+ msg_warn("service %s: ignoring %s change",
+ name, VAR_INET_INTERFACES);
+ msg_warn("to change %s, stop and start Postfix",
+ VAR_INET_INTERFACES);
+ }
serv->type = MASTER_SERV_TYPE_INET;
atmp = inet_parse(name, &host, &port);
if (*host) {
inet_addr_host(MASTER_INET_ADDRLIST(serv), host);
inet_addr_list_uniq(MASTER_INET_ADDRLIST(serv));
serv->listen_fd_count = MASTER_INET_ADDRLIST(serv)->used;
- } else if (strcasecmp(var_inet_interfaces, DEF_INET_INTERFACES) == 0) {
+ } else if (strcasecmp(saved_interfaces, DEF_INET_INTERFACES) == 0) {
MASTER_INET_ADDRLIST(serv) = 0; /* wild-card */
serv->listen_fd_count = 1;
} else {
#include <unistd.h>
#include <time.h>
#include <fcntl.h>
+#include <string.h>
/* Utility library. */
* See if this is a plausible file.
*/
if ((ch = VSTREAM_GETC(fp)) != VSTREAM_EOF) {
- if (ch != REC_TYPE_TIME && ch != REC_TYPE_SIZE) {
+ if (!strchr(REC_TYPE_POST_ENVELOPE, ch)) {
msg_warn("%s: input is not a valid queue file", VSTREAM_PATH(fp));
return;
}
char *line;
char *next_line;
- /*
- * Pipe the unmodified message header through the header line folding
- * routine.
- */
- for (line = start = STR(buf); line; line = next_line) {
- next_line = split_at(line, '\n');
- output_text(context, REC_TYPE_NORM, line, next_line ?
- next_line - line - 1 : strlen(line), offset);
- }
-
/*
* Parse the header line, and save copies of recipient addresses in the
* appropriate place.
*/
if (header_class == MIME_HDR_PRIMARY
&& header_info
- && header_info->flags & HDR_OPT_RECIP
- && header_info->flags & HDR_OPT_EXTRACT
+ && (header_info->flags & HDR_OPT_RECIP)
+ && (header_info->flags & HDR_OPT_EXTRACT)
&& (state->resent == 0 || (header_info->flags & HDR_OPT_RR))) {
if (header_info->flags & HDR_OPT_RR) {
rcpt = state->resent_recip;
myfree((char *) addr_list);
tok822_free_tree(tree);
}
+
+ /*
+ * Pipe the unmodified message header through the header line folding
+ * routine.
+ */
+ for (line = start = STR(buf); line; line = next_line) {
+ next_line = split_at(line, '\n');
+ output_text(context, REC_TYPE_NORM, line, next_line ?
+ next_line - line - 1 : strlen(line), offset);
+ }
}
/* enqueue - post one message */
* Report trouble. Log a warning only if we are going to sleep+reject so
* that attackers can't flood our logfiles.
*/
- if ((arg->strval[0] == 0 && !allow_empty_addr) || arg->strval[0] == '@') {
+ if ((arg->strval[0] == 0 && !allow_empty_addr)
+ || (strict_rfc821 && arg->strval[0] == '@')) {
msg_warn("Illegal address syntax from %s in %s command: %s",
state->namaddr, state->where, STR(arg->vstrval));
err = "501 Bad address syntax";