Resolve conflicts

This commit is contained in:
heas 2004-07-28 23:19:42 +00:00
parent 6bb314b03e
commit c5f2fcaa9d
11 changed files with 78 additions and 44 deletions

View File

@ -15,14 +15,12 @@ snapshot releases.
Major changes - critical
------------------------
If you run Postfix 1.x or earlier then you must stop Postfix before
upgrading. This is because the master-child protocols have changed,
and very little will work with the old master daemon process.
[Incompat 20021119] You can upgrade Postfix 2.0 without stopping.
After upgrading an existing Postfix 2.0 system you must use "postfix
reload". Some internal protocols have changed, but the master-child
protocols are the same as with Postfix 2.0.
If you run Postfix 2.0 or earlier then you must stop Postfix before
upgrading. The master-child protocols have changed between Postfix
1.1 and 2.0, and version 2.1 sometimes writes queue files that the
2.0 and earlier queue managers complain about. If this happens move
the files from the corrupt directory to the maildrop directory and
give them another chance.
[Incompat 20021119] The Postfix upgrade procedure will add two new
services to your master.cf file: "trace" and "verify". These servers

View File

@ -1,4 +1,4 @@
# $NetBSD: main.cf,v 1.10 2004/05/17 06:00:14 agc Exp $
# $NetBSD: main.cf,v 1.11 2004/07/28 23:19:42 heas Exp $
#
# Global Postfix configuration file. This file lists only a subset
# of all 300+ parameters. See the postconf(5) manual page for a
@ -504,7 +504,7 @@ unknown_local_recipient_reject_code = 550
# JUNK MAIL CONTROLS
#
# The controls listed here are only a very small subset. The file
# SPTMD_ACCESS_README provides an overview.
# SMTPD_ACCESS_README provides an overview.
# The header_checks parameter specifies an optional table with patterns
# that each logical message header is matched against, including

View File

@ -1,4 +1,4 @@
# $NetBSD: master.cf,v 1.9 2004/05/20 22:06:52 dan Exp $
# $NetBSD: master.cf,v 1.10 2004/07/28 23:19:42 heas Exp $
#
#
# Postfix master process configuration file. Each logical line

View File

@ -1,6 +1,7 @@
#!/bin/sh
# $NetBSD: post-install,v 1.6 2004/05/31 00:46:46 heas Exp $
# $NetBSD: post-install,v 1.7 2004/07/28 23:19:42 heas Exp $
#
# To view the formatted manual page of this file, type:
# POSTFIXSOURCE/mantools/srctoman - post-install | nroff -man

View File

@ -1,4 +1,4 @@
# $NetBSD: postfix-files,v 1.2 2004/05/31 00:46:46 heas Exp $
# $NetBSD: postfix-files,v 1.3 2004/07/28 23:19:42 heas Exp $
#
#
# Do not edit this file.

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $NetBSD: postfix-script,v 1.2 2004/05/31 00:46:46 heas Exp $
# $NetBSD: postfix-script,v 1.3 2004/07/28 23:19:42 heas Exp $
#
#++

View File

@ -1,4 +1,4 @@
/* $NetBSD: mynetworks.c,v 1.4 2004/05/31 00:46:47 heas Exp $ */
/* $NetBSD: mynetworks.c,v 1.5 2004/07/28 23:19:42 heas Exp $ */
/*++
/* NAME
@ -93,6 +93,17 @@ const char *mynetworks(void)
mask_style = name_mask("mynetworks mask style", mask_styles,
var_mynetworks_style);
/*
* XXX Workaround: name_mask() needs a flags argument so that we can
* require exactly one value, or we need to provide an API that is
* dedicated for single-valued flags.
*/
for (i = 0, junk = mask_style; junk != 0; junk >>= 1)
i += (junk & 1);
if (i != 1)
msg_fatal("bad %s value: %s; specify exactly one value",
VAR_MYNETWORKS_STYLE, var_mynetworks_style);
result = vstring_alloc(20);
my_addr_list = own_inet_addr_list();
my_mask_list = own_inet_mask_list();

View File

@ -1,4 +1,4 @@
/* $NetBSD: qmgr_message.c,v 1.11 2004/05/31 00:46:48 heas Exp $ */
/* $NetBSD: qmgr_message.c,v 1.12 2004/07/28 23:19:42 heas Exp $ */
/*++
/* NAME
@ -982,10 +982,9 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
* agent resources. We use recipient@nexthop as queue name rather
* than the actual recipient domain name, so that one recipient in
* multiple equivalent domains cannot evade the per-recipient
* concurrency limit. XXX Should split the address on the recipient
* delimiter if one is defined, but doing a proper job requires
* knowledge of local aliases. Yuck! I don't want to duplicate
* delivery-agent specific knowledge in the queue manager.
* concurrency limit. Split the address on the recipient delimiter if
* one is defined, so that extended addresses don't get extra
* delivery slots.
*
* Fold the result to lower case so that we don't have multiple queues
* for the same name.
@ -993,18 +992,32 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
* Important! All recipients in a queue must have the same nexthop
* value. It is OK to have multiple queues with the same nexthop
* value, but only when those queues are named after recipients.
*
* The single-recipient code below was written for local(8) like
* delivery agents, and assumes that all domains that deliver to the
* same (transport + nexthop) are aliases for $nexthop. Delivery
* concurrency is changed from per-domain into per-recipient, by
* changing the queue name from nexthop into localpart@nexthop.
*
* XXX This assumption is incorrect when different destinations share
* the same (transport + nexthop). In reality, such transports are
* rarely configured to use single-recipient deliveries. The fix is
* to decouple the per-destination recipient limit from the
* per-destination concurrency.
*/
vstring_strcpy(queue_name, STR(reply.nexthop));
if (strcmp(transport->name, MAIL_SERVICE_ERROR) != 0
&& transport->recipient_limit == 1) {
/* Copy the recipient localpart. */
at = strrchr(STR(reply.recipient), '@');
len = (at ? (at - STR(reply.recipient))
: strlen(STR(reply.recipient)));
VSTRING_SPACE(queue_name, len + 2);
memmove(STR(queue_name) + len + 1, STR(queue_name),
LEN(queue_name) + 1);
memcpy(STR(queue_name), STR(reply.recipient), len);
STR(queue_name)[len] = '@';
vstring_strncpy(queue_name, STR(reply.recipient), len);
/* Remove the address extension from the recipient localpart. */
if (*var_rcpt_delim && split_addr(STR(queue_name), *var_rcpt_delim))
vstring_truncate(queue_name, strlen(STR(queue_name)));
/* Assume the recipient domain is equivalent to nexthop. */
vstring_sprintf_append(queue_name, "@%s", STR(reply.nexthop));
}
lowercase(STR(queue_name));

View File

@ -1,4 +1,4 @@
/* $NetBSD: smtp_connect.c,v 1.11 2004/05/31 00:46:48 heas Exp $ */
/* $NetBSD: smtp_connect.c,v 1.12 2004/07/28 23:19:42 heas Exp $ */
/*++
/* NAME
@ -351,6 +351,7 @@ int smtp_connect(SMTP_STATE *state)
if (++addr_count == var_smtp_mxaddr_limit)
next = 0;
if ((state->session = smtp_connect_addr(addr, port, why)) != 0) {
state->features = 0; /* XXX should be SESSION info */
if (++sess_count == var_smtp_mxsess_limit)
next = 0;
state->final_server = (cpp[1] == 0 && next == 0);
@ -358,13 +359,20 @@ int smtp_connect(SMTP_STATE *state)
debug_peer_check(state->session->host, state->session->addr);
if (smtp_helo(state, misc_flags) == 0)
smtp_xfer(state);
if (state->history != 0
&& (state->error_mask & name_mask(VAR_NOTIFY_CLASSES,
mail_error_masks, var_notify_classes)))
if (state->history != 0) {
if (state->error_mask & name_mask(VAR_NOTIFY_CLASSES,
mail_error_masks, var_notify_classes))
smtp_chat_notify(state);
smtp_chat_reset(state);
}
state->error_mask = 0;
state->size_limit = 0;
/* XXX smtp_xfer() may abort in the middle of DATA. */
smtp_session_free(state->session);
state->session = 0;
#ifdef USE_SASL_AUTH
smtp_sasl_cleanup(state);
#endif
debug_peer_restore();
smtp_rcpt_cleanup(state);
} else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: smtpd.c,v 1.10 2004/05/31 00:46:48 heas Exp $ */
/* $NetBSD: smtpd.c,v 1.11 2004/07/28 23:19:42 heas Exp $ */
/*++
/* NAME
@ -340,6 +340,8 @@
/* The number of junk commands (NOOP, VRFY, ETRN or RSET) that a remote
/* SMTP client can send before the Postfix SMTP server starts to
/* increment the error counter with each junk command.
/* .PP
/* Available in Postfix version 2.1 and later:
/* .IP "\fBsmtpd_recipient_overshoot_limit (1000)\fR"
/* The number of recipients that a remote SMTP client can send in
/* excess of the limit specified with $smtpd_recipient_limit, before
@ -351,9 +353,6 @@
/* As of version 2.1, Postfix can be configured to delegate access
/* policy decisions to an external server that runs outside Postfix.
/* See the file SMTPD_POLICY_README for more information.
/* .IP "\fBsmtpd_policy_service_timeout (100s)\fR"
/* The time limit for connecting to, writing to or receiving from a
/* delegated SMTPD policy server.
/* .IP "\fBsmtpd_policy_service_max_idle (300s)\fR"
/* The time after which an idle SMTPD policy service connection is
/* closed.
@ -426,7 +425,7 @@
/* SENDER AND RECIPIENT ADDRESS VERIFICATION CONTROLS
/* .ad
/* .fi
/* Postfix version 2.1 introduces sender and address verification.
/* Postfix version 2.1 introduces sender and recipient address verification.
/* This feature is implemented by sending probe email messages that
/* are not actually delivered.
/* This feature is requested via the reject_unverified_sender and
@ -537,7 +536,7 @@
/* The list of "trusted" SMTP clients that have more privileges than
/* "strangers".
/* .IP "\fBmyorigin ($myhostname)\fR"
/* The default domain name that locally-posted mail appears to come
/* The domain name that locally-posted mail appears to come
/* from, and that locally posted mail is delivered to.
/* .IP "\fBprocess_id (read-only)\fR"
/* The process ID of a Postfix command or daemon process.
@ -814,6 +813,11 @@ static void mail_reset(SMTPD_STATE *);
static void rcpt_reset(SMTPD_STATE *);
static void chat_reset(SMTPD_STATE *, int);
/*
* This filter is applied after printable().
*/
#define NEUTER_CHARACTERS " <>()\\\";:@"
#ifdef USE_SASL_AUTH
/*
@ -885,7 +889,7 @@ static int helo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
mail_reset(state);
rcpt_reset(state);
state->helo_name = mystrdup(printable(argv[1].strval, '?'));
neuter(state->helo_name, "<>()\\\";:@", '?');
neuter(state->helo_name, NEUTER_CHARACTERS, '?');
/* Downgrading the protocol name breaks the unauthorized pipelining test. */
if (strcasecmp(state->protocol, MAIL_PROTO_ESMTP) != 0
&& strcasecmp(state->protocol, MAIL_PROTO_SMTP) != 0) {
@ -926,7 +930,7 @@ static int ehlo_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
mail_reset(state);
rcpt_reset(state);
state->helo_name = mystrdup(printable(argv[1].strval, '?'));
neuter(state->helo_name, "<>()\\\";:@", '?');
neuter(state->helo_name, NEUTER_CHARACTERS, '?');
if (strcasecmp(state->protocol, MAIL_PROTO_ESMTP) != 0) {
myfree(state->protocol);
state->protocol = mystrdup(MAIL_PROTO_ESMTP);
@ -2015,7 +2019,6 @@ static int xclient_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
if (s) myfree(s); \
s = (v) ? mystrdup(v) : 0; \
} while(0)
#define NEUTER_CHARACTERS "<>()\\\";:@"
/*
* Iterate over all attribute=value elements.

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_defs.h,v 1.13 2004/05/31 03:55:20 heas Exp $ */
/* $NetBSD: sys_defs.h,v 1.14 2004/07/28 23:19:42 heas Exp $ */
#ifndef _SYS_DEFS_H_INCLUDED_
#define _SYS_DEFS_H_INCLUDED_
@ -53,11 +53,11 @@
#define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
#define ROOT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
#if (defined(__NetBSD_Version__) && __NetBSD_Version__ > 200040000)
#define USE_STATVFS
#define STATVFS_IN_SYS_STATVFS_H
# define USE_STATVFS
# define STATVFS_IN_SYS_STATVFS_H
#else
#define USE_STATFS
#define STATFS_IN_SYS_MOUNT_H
# define USE_STATFS
# define STATFS_IN_SYS_MOUNT_H
#endif
#define HAS_POSIX_REGEXP
#define HAS_ST_GEN /* struct stat contains inode generation number */