2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-31 06:05:37 +00:00

snapshot-20011030

This commit is contained in:
Wietse Venema
2001-10-30 00:00:00 -05:00
committed by Viktor Dukhovni
parent 6561eb3f82
commit a8ed8b608c
18 changed files with 58 additions and 45 deletions

View File

@@ -48,6 +48,11 @@ compatible with that of versions 2 and 3 (versions 2 and 3 have
the same format). If you switch between DB versions, then you may
have to rebuild all your Postfix DB files.
Warning: if you use Berkeley DB version 2 or later, do not enable
DB 1.85 compatibility mode. Doing so would break file locking on
Solaris, HP-UX, UNIXWARE, IRIX and other systems, causing mail to
be lost when you update a table while Postfix is running.
Building Postfix on Linux with a specific Berkeley DB version
=============================================================

View File

@@ -5489,19 +5489,20 @@ Apologies for any names omitted.
20011010
Specify the name of the UNIX-domain socket (instead of
"unknown stream") when a Postfix daemon complains about a
malformed client request. Files: master/*server.c.
Postfix daemons now print the name of the UNIX-domain socket
(instead of "unknown stream") complaining about a malformed
client request. Files: master/*server.c.
20011010-14
Replaced the internal protocols by (name,value) attribute
lists. This gives better error detection when we start
making changes to internal protocols.
making changes to internal protocols, and allows new
attributes to be introduced without breaking protocols.
20011015
Put base 64 encoding into place on the replced internal
Put base 64 encoding into place on the replaced internal
protocols. Files: util/base64_code.[hc].
Feature: header/body REJECT rules can now end in text that
@@ -5524,13 +5525,18 @@ Apologies for any names omitted.
Open problems:
Medium: need in-process caching for map lookups.
Minor: The $process_id_directory setting is not used anywhere
in Postfix. Problem reported by Michael Smith, texas.net.
This should either be documented, or better, the code should
issue a warning to set a read-only parameter.
warn about attempts to set a read-only parameter.
Medium: address rewriting should be on/off configurable
for envelopes and/or headers.
Medium: smtpd access maps doesn't understand the recipient
Medium: smtpd access maps don't understand the recipient
delimiter setting.
Low: the virtual delivery agent needs a way to specify
fixed uid/gid for all deliveries.

View File

@@ -152,15 +152,16 @@ In any case, if the command
% make
produces compiler error messages, it may be time to examine the
FAQ document.
FAQ document (see htlm/faq.html).
5 - Porting to on an unsupported system
=======================================
- Choose a SYSTEMTYPE name for the new system. Please use a name
that includes the major version of the operating system (such as
SUNOS4 or LINUX2), so that different releases of the same system
can be supported without confusion.
- Each system type is identified by a unique name. Examples:
SUNOS5, FREEBSD4, and so on. Choose a SYSTEMTYPE name for the new
system. You must use a name that includes at least the major version
of the operating system (such as SUNOS4 or LINUX2), so that different
releases of the same system can be supported without confusion.
- Add a case statement to the "makedefs" shell script in the
top-level directory that recognizes the new system reliably, and
@@ -222,7 +223,7 @@ In order to install or upgrade Postfix:
The INSTALL.sh script offers suggestions for pathnames that you
can override, either by editing INSTALL.sh or by specifying your
preferences interactively. INSTALL.sh stores your preferences in
the Postfix configuration directory in order to ease future installs.
/etc/postfix/install.cf in order to ease future installs.
- Proceed to the section on how you wish to run Postfix on your
particular machine:

View File

@@ -35,6 +35,8 @@ header_checks = regexp:/etc/postfix/header_checks
#
# REJECT the entire message is rejected.
#
# REJECT text.... The text is sent to the originator.
#
# IGNORE the body line is silently discarded.
#
# OK Nothing happens. The message will still be rejected when some

View File

@@ -40,7 +40,7 @@ smtpd_banner = $myhostname ESMTP $mail_name
# maptype:mapname: look up client name, parent domains, client address,
# or networks obtained by stripping octets.
# Reject if result is REJECT or "[45]xx text"
# Permit result is OK or all numerical.
# Permit if result is OK or all numerical.
# reject_maps_rbl: reject if the reverse client network address
# is listed under $maps_rbl_domains.
# reject: reject the request. Place this at the end of a restriction.
@@ -154,7 +154,7 @@ mynetworks_style = subnet
# maptype:mapname: look up client name, parent domains, client address,
# or networks obtained by stripping octets.
# Reject if result is REJECT or "[45]xx text"
# Permit result is OK or all numerical.
# Permit if result is OK or all numerical.
# reject_maps_rbl: reject if the client is listed under $maps_rbl_domains.
# reject: reject the request. Place this at the end of a restriction.
# permit: permit the request. Place this at the end of a restriction.
@@ -191,7 +191,7 @@ smtpd_helo_required = no
# check_helo_access maptype:mapname
# maptype:mapname: look up HELO hostname or parent domains.
# Reject if result is REJECT or "[45]xx text"
# Permit result is OK or all numerical.
# Permit if result is OK or all numerical.
# check_client_access maptype:mapname: see smtpd_client_restrictions.
# reject: reject the request. Place this at the end of a restriction.
# permit: permit the request. Place this at the end of a restriction.
@@ -221,7 +221,7 @@ smtpd_helo_restrictions =
# check_sender_access maptype:mapname
# maptype:mapname: look up sender address, parent domain, or localpart@.
# Reject if result is REJECT or "[45]xx text"
# Permit result is OK or all numerical.
# Permit if result is OK or all numerical.
# check_client_access maptype:mapname: see smtpd_client_restrictions.
# check_helo_access maptype:mapname: see smtpd_helo_restrictions.
# reject_non_fqdn_hostname: reject HELO hostname that is not in FQDN form
@@ -289,7 +289,7 @@ smtpd_sender_restrictions =
# check_recipient_access maptype:mapname
# maptype:mapname: look up recipient address, parent domain, or localpart@.
# Reject if result is REJECT or "[45]xx text"
# Permit result is OK or all numerical.
# Permit if result is OK or all numerical.
# check_client_access maptype:mapname: see smtpd_client_restrictions.
# check_helo_access maptype:mapname: see smtpd_helo_restrictions.
# check_sender_access maptype:mapname: see smtpd_sender_restrictions.

View File

View File

@@ -227,7 +227,7 @@ static int bounce_verp_proto(char *service_name, VSTREAM *client, int flush)
/*
* Read and validate the client request.
*/
if (attr_scan(client, ATTR_FLAG_MISSING | ATTR_FLAG_EXTRA,
if (mail_command_server(client,
ATTR_TYPE_NUM, MAIL_ATTR_FLAGS, &flags,
ATTR_TYPE_STR, MAIL_ATTR_QUEUE, queue_name,
ATTR_TYPE_STR, MAIL_ATTR_QUEUEID, queue_id,

View File

@@ -234,7 +234,7 @@ static void cleanup_service(VSTREAM *src, char *unused_service, char **argv)
* Finish this message, and report the result status to the client.
*/
attr_print(src, ATTR_FLAG_NONE,
ATTR_TYPE_NUM, MAIL_ATTR_STATUS, cleanup_close(state),
ATTR_TYPE_NUM, MAIL_ATTR_STATUS, cleanup_flush(state),
ATTR_TYPE_STR, MAIL_ATTR_WHY, state->reason ?
state->reason : "",
ATTR_TYPE_END);

View File

@@ -104,7 +104,7 @@ extern void cleanup_state_free(CLEANUP_STATE *);
*/
extern CLEANUP_STATE *cleanup_open(void);
extern void cleanup_control(CLEANUP_STATE *, int);
extern int cleanup_close(CLEANUP_STATE *);
extern int cleanup_flush(CLEANUP_STATE *);
extern void cleanup_free(CLEANUP_STATE *);
extern void cleanup_all(void);
extern void cleanup_pre_jail(char *, char **);

View File

@@ -18,7 +18,7 @@
/* char *buf;
/* int len;
/*
/* int cleanup_close(state)
/* int cleanup_flush(state)
/* CLEANUP_STATE *state;
/*
/* int cleanup_free(state)
@@ -30,7 +30,7 @@
/*
/* cleanup_open() creates a new queue file and performs other
/* per-message initialization. The result is a handle that should be
/* given to the cleanup_control(), cleanup_record(), cleanup_close()
/* given to the cleanup_control(), cleanup_record(), cleanup_flush()
/* and cleanup_free() routines. The name of the queue file is in the
/* queue_id result structure member.
/*
@@ -54,9 +54,9 @@
/* REC_TYPE_END. In order to find out if a message is corrupted,
/* the caller is encouraged to test the CLEANUP_OUT_OK(state) macro.
/* The result is false when further message processing is futile.
/* In that case, it is safe to call cleanup_close() immediately.
/* In that case, it is safe to call cleanup_flush() immediately.
/*
/* cleanup_close() closes a queue file. In case of any errors,
/* cleanup_flush() closes a queue file. In case of any errors,
/* the file is removed. The result value is non-zero in case of
/* problems. In some cases a human-readable text can be found in
/* the state->reason member. In all other cases, use cleanup_strerror()
@@ -170,9 +170,9 @@ void cleanup_control(CLEANUP_STATE *state, int flags)
}
}
/* cleanup_close - finish queue file */
/* cleanup_flush - finish queue file */
int cleanup_close(CLEANUP_STATE *state)
int cleanup_flush(CLEANUP_STATE *state)
{
char *junk;
int status;
@@ -261,7 +261,7 @@ int cleanup_close(CLEANUP_STATE *state)
* initializations at the beginning of cleanup_open().
*/
if (msg_verbose)
msg_info("cleanup_close: status %d", state->errs);
msg_info("cleanup_flush: status %d", state->errs);
status = state->errs;
return (status);
}

View File

@@ -127,7 +127,7 @@ ARGV *cleanup_map1n_internal(CLEANUP_STATE *state, char *addr,
* Allow an address to expand into itself once.
*/
if (strcasecmp(saved_lhs, STR(state->temp1)) == 0)
been_here_fixed(been_here, argv->argv[arg]);
been_here_fixed(been_here, saved_lhs);
}
myfree(saved_lhs);
argv_free(lookup);

View File

@@ -60,7 +60,6 @@ void cleanup_out_recipient(CLEANUP_STATE *state, char *recip)
{
ARGV *argv;
char **cpp;
int envelope_changed;
if (cleanup_virtual_maps == 0) {
if (been_here_fixed(state->dups, recip) == 0)
@@ -68,13 +67,9 @@ void cleanup_out_recipient(CLEANUP_STATE *state, char *recip)
} else {
argv = cleanup_map1n_internal(state, recip, cleanup_virtual_maps,
cleanup_ext_prop_mask & EXT_PROP_VIRTUAL);
envelope_changed = (argv->argc > 1 || strcmp(recip, argv->argv[0]));
for (cpp = argv->argv; *cpp; cpp++)
if (been_here_fixed(state->dups, *cpp) == 0) {
if (envelope_changed)
cleanup_out_string(state, REC_TYPE_ORCP, recip);
if (been_here_fixed(state->dups, *cpp) == 0)
cleanup_out_string(state, REC_TYPE_RCPT, *cpp), state->rcpt_count++;
}
argv_free(argv);
}
}

View File

@@ -540,9 +540,12 @@ static void flush_service(VSTREAM *client_stream, char *unused_service,
* All connection-management stuff is handled by the common code in
* single_server.c.
*/
if (attr_scan(client_stream, ATTR_FLAG_MORE | ATTR_FLAG_EXTRA | ATTR_FLAG_MISSING,
ATTR_TYPE_STR, MAIL_ATTR_REQ, request,
ATTR_TYPE_END) == 1) {
if (peekfd(vstream_fileno(client_stream)) <= 2 ?
(vstring_get_null(request, client_stream) != VSTREAM_EOF) :
(attr_scan(client_stream,
ATTR_FLAG_MORE | ATTR_FLAG_EXTRA | ATTR_FLAG_MISSING,
ATTR_TYPE_STR, MAIL_ATTR_REQ, request,
ATTR_TYPE_END) == 1)) {
if (STREQ(STR(request), FLUSH_REQ_ADD)) {
site = vstring_alloc(10);
queue_id = vstring_alloc(10);

View File

@@ -15,7 +15,7 @@
* Version of this program.
*/
#define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "Snapshot-20011029"
#define DEF_MAIL_VERSION "Snapshot-20011030"
extern char *var_mail_version;
/* LICENSE

View File

@@ -236,9 +236,10 @@ int post_mail_fclose(VSTREAM *cleanup)
} else {
rec_fputs(cleanup, REC_TYPE_XTRA, "");
rec_fputs(cleanup, REC_TYPE_END, "");
if (vstream_fflush(cleanup) || attr_scan(cleanup, ATTR_FLAG_MISSING | ATTR_FLAG_EXTRA,
ATTR_TYPE_NUM, MAIL_ATTR_STATUS, &status,
ATTR_TYPE_END) != 1)
if (vstream_fflush(cleanup)
|| attr_scan(cleanup, ATTR_FLAG_MISSING,
ATTR_TYPE_NUM, MAIL_ATTR_STATUS, &status,
ATTR_TYPE_END) != 1)
status = CLEANUP_STAT_WRITE;
}
(void) vstream_fclose(cleanup);

View File

@@ -241,7 +241,7 @@ static int forward_send(FORWARD_INFO *info, DELIVER_ATTR attr, char *delivered)
*/
if (status == 0)
if (vstream_fflush(info->cleanup)
|| attr_scan(info->cleanup, ATTR_FLAG_MISSING | ATTR_FLAG_EXTRA,
|| attr_scan(info->cleanup, ATTR_FLAG_MISSING,
ATTR_TYPE_NUM, MAIL_ATTR_STATUS, &status,
ATTR_TYPE_END) != 1)
status = 1;

View File

@@ -172,7 +172,7 @@ int attr_vprint(VSTREAM *fp, int flags, va_list ap)
case ATTR_TYPE_NUM_ARRAY:
attr_name = va_arg(ap, char *);
attr_print_str(fp, attr_name, strlen(attr_name));
ip_val = va_arg(ap, int *);
ip_val = va_arg(ap, unsigned int *);
count_val = va_arg(ap, int);
for (i = 0; i < count_val; i++) {
VSTREAM_PUTC(':', fp);

View File

@@ -345,7 +345,7 @@ int attr_vscan(VSTREAM *fp, int flags, va_list ap)
STR(name_buf), VSTREAM_PATH(fp));
return (conversions);
}
number = va_arg(ap, int *);
number = va_arg(ap, unsigned int *);
if ((ch = attr_scan_number(fp, number, str_buf,
"attribute value")) < 0)
return (conversions);