2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-31 14:17:41 +00:00

postfix-1.1.11-20020918

This commit is contained in:
Wietse Venema
2002-09-18 00:00:00 -05:00
committed by Viktor Dukhovni
parent 5ca8554dc7
commit 9e4b7b9937
7 changed files with 113 additions and 76 deletions

View File

@@ -6419,7 +6419,6 @@ Apologies for any names omitted.
20020513 20020513
Bugfix: the LDAP client used the "wrong" @ character in Bugfix: the LDAP client used the "wrong" @ character in
addresses with multiple @. LaMont Jones, HP. File: addresses with multiple @. LaMont Jones, HP. File:
util/dict_ldap.c. util/dict_ldap.c.
@@ -6969,6 +6968,16 @@ Apologies for any names omitted.
compiled in if the PCRE library code is found under compiled in if the PCRE library code is found under
/usr/include and /usr/lib. File: makedefs. /usr/include and /usr/lib. File: makedefs.
20020918
Documentation: postsuper(1) did not document the -c option.
Bugfix: possible longjump() before setjmp(). File:
smtpd/smtpd.c.
Bugfix: pickup should not preserve INSPECT or FILTER records
from "postsuper -r". File: pickup/pickup.c.
Open problems: Open problems:
Low: smtpd should log queue ID with reject/warn/hold/discard Low: smtpd should log queue ID with reject/warn/hold/discard

View File

@@ -5,8 +5,8 @@ POSTSUPER(1) POSTSUPER(1)
postsuper - Postfix superintendent postsuper - Postfix superintendent
<b>SYNOPSIS</b> <b>SYNOPSIS</b>
<b>postsuper</b> [<b>-psv</b>] [<b>-d</b> <i>queue_id</i>] [<b>-h</b> <i>queue_id</i>] [<b>-H</b> <i>queue_id</i>] <b>postsuper</b> [<b>-cpsv</b>] [<b>-d</b> <i>queue_id</i>] [<b>-h</b> <i>queue_id</i>] [<b>-H</b>
[<b>-r</b> <i>queue_id</i>] [<i>directory</i> <i>...</i>] <i>queue_id</i>] [<b>-r</b> <i>queue_id</i>] [<i>directory</i> <i>...</i>]
<b>DESCRIPTION</b> <b>DESCRIPTION</b>
The <b>postsuper</b> command does maintenance jobs on the Postfix The <b>postsuper</b> command does maintenance jobs on the Postfix
@@ -20,12 +20,18 @@ POSTSUPER(1) POSTSUPER(1)
Options: Options:
<b>-c</b> <i>config_dir</i>
The <b>main.cf</b> configuration file is in the named
directory instead of the default configuration
directory. See also the MAIL_CONFIG environment
setting below.
<b>-d</b> <i>queue_id</i> <b>-d</b> <i>queue_id</i>
Delete one message with the named queue ID from the Delete one message with the named queue ID from the
named mail queue(s) (default: <b>hold</b>, <b>incoming</b>, named mail queue(s) (default: <b>hold</b>, <b>incoming</b>,
<b>active</b> and <b>deferred</b>). If a <i>queue_id</i> of <b>-</b> is speci- <b>active</b> and <b>deferred</b>). If a <i>queue_id</i> of <b>-</b> is speci-
fied, the program reads queue IDs from standard fied, the program reads queue IDs from standard
input. For example, to delete all mail from or to input. For example, to delete all mail from or to
<b>user@example.com</b>: <b>user@example.com</b>:
mailq | awk 'BEGIN { RS = "" } \ mailq | awk 'BEGIN { RS = "" } \
@@ -33,137 +39,141 @@ POSTSUPER(1) POSTSUPER(1)
' | tr -d '*!' | postsuper -d - ' | tr -d '*!' | postsuper -d -
Specify <b>-d</b> <b>ALL</b> to remove all messages; for example, Specify <b>-d</b> <b>ALL</b> to remove all messages; for example,
specify <b>-d</b> <b>ALL</b> <b>deferred</b> to delete mail in the specify <b>-d</b> <b>ALL</b> <b>deferred</b> to delete mail in the
<b>deferred</b> queue. As a safety measure, the word <b>ALL</b> <b>deferred</b> queue. As a safety measure, the word <b>ALL</b>
must be specified in upper case. must be specified in upper case.
<b>Postfix</b> <b>queue</b> <b>IDs</b> <b>are</b> <b>reused.</b> <b>There</b> <b>is</b> <b>a</b> <b>very</b> <b>Postfix</b> <b>queue</b> <b>IDs</b> <b>are</b> <b>reused.</b> <b>There</b> <b>is</b> <b>a</b> <b>very</b>
<b>small</b> <b>possibility</b> <b>that</b> <b>postsuper</b> <b>deletes</b> <b>the</b> <b>wrong</b> <b>small</b> <b>possibility</b> <b>that</b> <b>postsuper</b> <b>deletes</b> <b>the</b> <b>wrong</b>
<b>message</b> <b>file</b> <b>when</b> <b>it</b> <b>is</b> <b>executed</b> <b>while</b> <b>the</b> <b>Postfix</b> <b>message</b> <b>file</b> <b>when</b> <b>it</b> <b>is</b> <b>executed</b> <b>while</b> <b>the</b> <b>Postfix</b>
<b>mail</b> <b>system</b> <b>is</b> <b>running.</b> <b>mail</b> <b>system</b> <b>is</b> <b>running.</b>
The scenario is as follows: The scenario is as follows:
1) The Postfix queue manager deletes the mes- 1) The Postfix queue manager deletes the mes-
sage that <b>postsuper</b> is supposed to delete, sage that <b>postsuper</b> is supposed to delete,
because Postfix is finished with the mes- because Postfix is finished with the mes-
sage. sage.
2) New mail arrives, and the new message is 2) New mail arrives, and the new message is
given the same queue ID as the message that given the same queue ID as the message that
<b>postsuper</b> is supposed to delete. The proba- <b>postsuper</b> is supposed to delete. The proba-
bility for reusing a deleted queue ID is bility for reusing a deleted queue ID is
about 1 in 2**15 (the number of different about 1 in 2**15 (the number of different
microsecond values that the system clock can microsecond values that the system clock can
distinguish within a second). distinguish within a second).
3) <b>postsuper</b> deletes the new message, instead 3) <b>postsuper</b> deletes the new message, instead
of the old message that it should have of the old message that it should have
deleted. deleted.
<b>-h</b> <i>queue_id</i> <b>-h</b> <i>queue_id</i>
Put mail "on hold" so that no attempt is made to Put mail "on hold" so that no attempt is made to
deliver it. Move one message with the named queue deliver it. Move one message with the named queue
ID from the named mail queue(s) (default: <b>incoming</b>, ID from the named mail queue(s) (default: <b>incoming</b>,
<b>active</b> and <b>deferred</b>) to the <b>hold</b> queue. If a <b>active</b> and <b>deferred</b>) to the <b>hold</b> queue. If a
<i>queue_id</i> of <b>-</b> is specified, the program reads queue <i>queue_id</i> of <b>-</b> is specified, the program reads queue
IDs from standard input. IDs from standard input.
Specify <b>-h</b> <b>ALL</b> to hold all messages; for example, Specify <b>-h</b> <b>ALL</b> to hold all messages; for example,
specify <b>-h</b> <b>ALL</b> <b>deferred</b> to hold mail in the specify <b>-h</b> <b>ALL</b> <b>deferred</b> to hold mail in the
<b>deferred</b> queue. As a safety measure, the word <b>ALL</b> <b>deferred</b> queue. As a safety measure, the word <b>ALL</b>
must be specified in upper case. must be specified in upper case.
Note: mail that is put "on hold" will not expire Note: mail that is put "on hold" will not expire
when its time in the queue exceeds the <b>maxi-</b> when its time in the queue exceeds the <b>maxi-</b>
<b>mal</b><i>_</i><b>queue</b><i>_</i><b>lifetime</b> setting. <b>mal</b><i>_</i><b>queue</b><i>_</i><b>lifetime</b> setting.
<b>-H</b> <i>queue_id</i> <b>-H</b> <i>queue_id</i>
Release mail that was put "on hold". Move one mes- Release mail that was put "on hold". Move one mes-
sage with the named queue ID from the named mail sage with the named queue ID from the named mail
queue(s) (default: <b>hold</b>) to the <b>deferred</b> queue. If queue(s) (default: <b>hold</b>) to the <b>deferred</b> queue. If
a <i>queue_id</i> of <b>-</b> is specified, the program reads a <i>queue_id</i> of <b>-</b> is specified, the program reads
queue IDs from standard input. queue IDs from standard input.
Specify <b>-H</b> <b>ALL</b> to release all mail that is "on Specify <b>-H</b> <b>ALL</b> to release all mail that is "on
hold". As a safety measure, the word <b>ALL</b> must be hold". As a safety measure, the word <b>ALL</b> must be
specified in upper case. specified in upper case.
<b>-p</b> Purge old temporary files that are left over after <b>-p</b> Purge old temporary files that are left over after
system or software crashes. system or software crashes.
<b>-r</b> <i>queue_id</i> <b>-r</b> <i>queue_id</i>
Requeue the message with the named queue ID from Requeue the message with the named queue ID from
the named mail queue(s) (default: <b>hold</b>, <b>incoming</b>, the named mail queue(s) (default: <b>hold</b>, <b>incoming</b>,
<b>active</b> and <b>deferred</b>). To requeue multiple mes- <b>active</b> and <b>deferred</b>). To requeue multiple mes-
sages, specify multiple <b>-r</b> command-line options. sages, specify multiple <b>-r</b> command-line options.
Alternatively, if a <i>queue_id</i> of <b>-</b> is specified, the Alternatively, if a <i>queue_id</i> of <b>-</b> is specified, the
program reads queue IDs from standard input. program reads queue IDs from standard input.
Specify <b>-r</b> <b>ALL</b> to requeue all messages. As a safety Specify <b>-r</b> <b>ALL</b> to requeue all messages. As a safety
measure, the word <b>ALL</b> must be specified in upper measure, the word <b>ALL</b> must be specified in upper
case. case.
A requeued message is moved to the <b>maildrop</b> queue, A requeued message is moved to the <b>maildrop</b> queue,
from where it is copied by the pickup daemon to a from where it is copied by the pickup daemon to a
new file whose name is guaranteed to match the new new file whose name is guaranteed to match the new
queue file inode number. The new queue file is sub- queue file inode number. The new queue file is sub-
jected again to mail address rewriting and substi- jected again to mail address rewriting and substi-
tution. This is useful when rewriting rules or vir- tution. This is useful when rewriting rules or vir-
tual mappings have changed. tual mappings have changed.
Postfix queue IDs are reused. There is a very Postfix queue IDs are reused. There is a very
small possibility that <b>postsuper</b> requeues the wrong small possibility that <b>postsuper</b> requeues the wrong
message file when it is executed while the Postfix message file when it is executed while the Postfix
mail system is running, but no harm should be done. mail system is running, but no harm should be done.
<b>-s</b> Structure check and structure repair. It is highly <b>-s</b> Structure check and structure repair. It is highly
recommended to perform this operation once before recommended to perform this operation once before
Postfix startup. Postfix startup.
<b>o</b> Rename files whose name does not match the <b>o</b> Rename files whose name does not match the
message file inode number. This operation is message file inode number. This operation is
necessary after restoring a mail queue from necessary after restoring a mail queue from
a different machine, or from backup media. a different machine, or from backup media.
<b>o</b> Move queue files that are in the wrong place <b>o</b> Move queue files that are in the wrong place
in the file system hierarchy and remove sub- in the file system hierarchy and remove sub-
directories that are no longer needed. File directories that are no longer needed. File
position rearrangements are necessary after position rearrangements are necessary after
a change in the <b>hash</b><i>_</i><b>queue</b><i>_</i><b>names</b> and/or a change in the <b>hash</b><i>_</i><b>queue</b><i>_</i><b>names</b> and/or
<b>hash</b><i>_</i><b>queue</b><i>_</i><b>depth</b> configuration parameters. <b>hash</b><i>_</i><b>queue</b><i>_</i><b>depth</b> configuration parameters.
<b>-v</b> Enable verbose logging for debugging purposes. Mul- <b>-v</b> Enable verbose logging for debugging purposes. Mul-
tiple <b>-v</b> options make the software increasingly tiple <b>-v</b> options make the software increasingly
verbose. verbose.
<b>DIAGNOSTICS</b> <b>DIAGNOSTICS</b>
Problems are reported to the standard error stream and to Problems are reported to the standard error stream and to
<b>syslogd</b>. <b>syslogd</b>.
<b>postsuper</b> reports the number of messages deleted with <b>-d</b>, <b>postsuper</b> reports the number of messages deleted with <b>-d</b>,
the number of messages requeued with <b>-r</b>, and the number of the number of messages requeued with <b>-r</b>, and the number of
messages whose queue file name was fixed with <b>-s</b>. The messages whose queue file name was fixed with <b>-s</b>. The
report is written to the standard error stream and to <b>sys-</b> report is written to the standard error stream and to <b>sys-</b>
<b>logd</b>. <b>logd</b>.
<b>ENVIRONMENT</b>
MAIL_CONFIG
Directory with the <b>main.cf</b> file.
<b>BUGS</b> <b>BUGS</b>
Mail that is not sanitized by Postfix (i.e. mail in the Mail that is not sanitized by Postfix (i.e. mail in the
<b>maildrop</b> queue) cannot be placed "on hold". <b>maildrop</b> queue) cannot be placed "on hold".
<b>CONFIGURATION</b> <b>PARAMETERS</b> <b>CONFIGURATION</b> <b>PARAMETERS</b>
See the Postfix <b>main.cf</b> file for syntax details and for See the Postfix <b>main.cf</b> file for syntax details and for
default values. default values.
<b>hash</b><i>_</i><b>queue</b><i>_</i><b>depth</b> <b>hash</b><i>_</i><b>queue</b><i>_</i><b>depth</b>
Number of subdirectory levels for hashed queues. Number of subdirectory levels for hashed queues.
<b>hash</b><i>_</i><b>queue</b><i>_</i><b>names</b> <b>hash</b><i>_</i><b>queue</b><i>_</i><b>names</b>
The names of queues that are organized into multi- The names of queues that are organized into multi-
ple levels of subdirectories. ple levels of subdirectories.
<b>LICENSE</b> <b>LICENSE</b>
The Secure Mailer license must be distributed with this The Secure Mailer license must be distributed with this
software. software.
<b>AUTHOR(S)</b> <b>AUTHOR(S)</b>

View File

@@ -9,7 +9,7 @@ Postfix superintendent
.na .na
.nf .nf
.fi .fi
\fBpostsuper\fR [\fB-psv\fR] [\fB-d \fIqueue_id\fR] \fBpostsuper\fR [\fB-cpsv\fR] [\fB-d \fIqueue_id\fR]
[\fB-h \fIqueue_id\fR] [\fB-H \fIqueue_id\fR] [\fB-h \fIqueue_id\fR] [\fB-H \fIqueue_id\fR]
[\fB-r \fIqueue_id\fR] [\fIdirectory ...\fR] [\fB-r \fIqueue_id\fR] [\fIdirectory ...\fR]
.SH DESCRIPTION .SH DESCRIPTION
@@ -25,6 +25,10 @@ directories - this includes the \fBincoming\fR, \fBactive\fR and
\fBdefer\fR and \fBflush\fR directories with log files. \fBdefer\fR and \fBflush\fR directories with log files.
Options: Options:
.IP "\fB-c \fIconfig_dir\fR"
The \fBmain.cf\fR configuration file is in the named directory
instead of the default configuration directory. See also the
MAIL_CONFIG environment setting below.
.IP "\fB-d \fIqueue_id\fR" .IP "\fB-d \fIqueue_id\fR"
Delete one message with the named queue ID from the named Delete one message with the named queue ID from the named
mail queue(s) (default: \fBhold\fR, \fBincoming\fR, \fBactive\fR and mail queue(s) (default: \fBhold\fR, \fBincoming\fR, \fBactive\fR and
@@ -147,6 +151,13 @@ Problems are reported to the standard error stream and to
the number of messages requeued with \fB-r\fR, and the number of the number of messages requeued with \fB-r\fR, and the number of
messages whose queue file name was fixed with \fB-s\fR. The report messages whose queue file name was fixed with \fB-s\fR. The report
is written to the standard error stream and to \fBsyslogd\fR. is written to the standard error stream and to \fBsyslogd\fR.
.SH ENVIRONMENT
.na
.nf
.ad
.fi
.IP MAIL_CONFIG
Directory with the \fBmain.cf\fR file.
.SH BUGS .SH BUGS
.ad .ad
.fi .fi

View File

@@ -20,7 +20,7 @@
* Patches change the patchlevel and the release date. Snapshots change the * Patches change the patchlevel and the release date. Snapshots change the
* release date only, unless they include the same bugfix as a patch release. * release date only, unless they include the same bugfix as a patch release.
*/ */
#define MAIL_RELEASE_DATE "20020917" #define MAIL_RELEASE_DATE "20020918"
#define VAR_MAIL_VERSION "mail_version" #define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE #define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE

View File

@@ -212,15 +212,17 @@ static int copy_segment(VSTREAM *qfile, VSTREAM *cleanup, PICKUP_INFO *info,
} }
continue; continue;
} }
if (type == REC_TYPE_RRTO) if (type == REC_TYPE_RRTO)
/* Use message header extracted information instead. */ /* Use message header extracted information instead. */
continue; continue;
if (type == REC_TYPE_ERTO) if (type == REC_TYPE_ERTO)
/* Use message header extracted information instead. */ /* Use message header extracted information instead. */
continue; continue;
if (type == REC_TYPE_INSP && info->st.st_uid != var_owner_uid) if (type == REC_TYPE_INSP)
/* Use current content inspection settings instead. */
continue; continue;
if (type == REC_TYPE_FILT && info->st.st_uid != var_owner_uid) if (type == REC_TYPE_FILT)
/* Use current content filter settings instead. */
continue; continue;
else { else {

View File

@@ -5,7 +5,7 @@
/* Postfix superintendent /* Postfix superintendent
/* SYNOPSIS /* SYNOPSIS
/* .fi /* .fi
/* \fBpostsuper\fR [\fB-psv\fR] [\fB-d \fIqueue_id\fR] /* \fBpostsuper\fR [\fB-cpsv\fR] [\fB-d \fIqueue_id\fR]
/* [\fB-h \fIqueue_id\fR] [\fB-H \fIqueue_id\fR] /* [\fB-h \fIqueue_id\fR] [\fB-H \fIqueue_id\fR]
/* [\fB-r \fIqueue_id\fR] [\fIdirectory ...\fR] /* [\fB-r \fIqueue_id\fR] [\fIdirectory ...\fR]
/* DESCRIPTION /* DESCRIPTION
@@ -19,6 +19,10 @@
/* \fBdefer\fR and \fBflush\fR directories with log files. /* \fBdefer\fR and \fBflush\fR directories with log files.
/* /*
/* Options: /* Options:
/* .IP "\fB-c \fIconfig_dir\fR"
/* The \fBmain.cf\fR configuration file is in the named directory
/* instead of the default configuration directory. See also the
/* MAIL_CONFIG environment setting below.
/* .IP "\fB-d \fIqueue_id\fR" /* .IP "\fB-d \fIqueue_id\fR"
/* Delete one message with the named queue ID from the named /* Delete one message with the named queue ID from the named
/* mail queue(s) (default: \fBhold\fR, \fBincoming\fR, \fBactive\fR and /* mail queue(s) (default: \fBhold\fR, \fBincoming\fR, \fBactive\fR and
@@ -139,6 +143,11 @@
/* the number of messages requeued with \fB-r\fR, and the number of /* the number of messages requeued with \fB-r\fR, and the number of
/* messages whose queue file name was fixed with \fB-s\fR. The report /* messages whose queue file name was fixed with \fB-s\fR. The report
/* is written to the standard error stream and to \fBsyslogd\fR. /* is written to the standard error stream and to \fBsyslogd\fR.
/* ENVIRONMENT
/* .ad
/* .fi
/* .IP MAIL_CONFIG
/* Directory with the \fBmain.cf\fR file.
/* BUGS /* BUGS
/* Mail that is not sanitized by Postfix (i.e. mail in the \fBmaildrop\fR /* Mail that is not sanitized by Postfix (i.e. mail in the \fBmaildrop\fR
/* queue) cannot be placed "on hold". /* queue) cannot be placed "on hold".
@@ -838,8 +847,8 @@ static void super(const char **queues, int action)
* move queue files to the "right" subdirectory level. Like the * move queue files to the "right" subdirectory level. Like the
* hold_one() routine, this code does not touch logfiles, and * hold_one() routine, this code does not touch logfiles, and
* must not touch files in the maildrop queue, because maildrop * must not touch files in the maildrop queue, because maildrop
* files contain data that has not yet been sanitized and therefore * files contain data that has not yet been sanitized and
* must not be mixed with already sanitized mail. * therefore must not be mixed with already sanitized mail.
*/ */
if ((action & ACTION_HOLD_ALL) if ((action & ACTION_HOLD_ALL)
&& MESSAGE_QUEUE(qp) && MESSAGE_QUEUE(qp)

View File

@@ -1407,6 +1407,13 @@ static void smtpd_proto(SMTPD_STATE *state)
break; break;
case 0: case 0:
if (var_smtpd_delay_reject == 0
&& (state->access_denied = smtpd_check_client(state)) != 0) {
smtpd_chat_reply(state, "%s", state->access_denied);
} else {
smtpd_chat_reply(state, "220 %s", var_smtpd_banner);
}
for (;;) { for (;;) {
if (state->error_count > var_smtpd_hard_erlim) { if (state->error_count > var_smtpd_hard_erlim) {
state->reason = "too many errors"; state->reason = "too many errors";
@@ -1508,24 +1515,13 @@ static void smtpd_service(VSTREAM *stream, char *unused_service, char **argv)
* machines. * machines.
*/ */
smtpd_state_init(&state, stream); smtpd_state_init(&state, stream);
msg_info("connect from %s[%s]", state.name, state.addr);
/* /*
* See if we need to turn on verbose logging for this client. * See if we need to turn on verbose logging for this client.
*/ */
debug_peer_check(state.name, state.addr); debug_peer_check(state.name, state.addr);
/*
* See if we want to talk to this client at all. Then, log the connection
* event.
*/
if (var_smtpd_delay_reject == 0
&& (state.access_denied = smtpd_check_client(&state)) != 0) {
smtpd_chat_reply(&state, "%s", state.access_denied);
} else {
smtpd_chat_reply(&state, "220 %s", var_smtpd_banner);
msg_info("connect from %s[%s]", state.name, state.addr);
}
/* /*
* Provide the SMTP service. * Provide the SMTP service.
*/ */