From: Wietse Venema Date: Wed, 18 Sep 2002 05:00:00 +0000 (-0500) Subject: postfix-1.1.11-20020918 X-Git-Tag: v2.0.0~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e4b7b9937bb0f7fb8476e47d117103474f56a0e;p=thirdparty%2Fpostfix.git postfix-1.1.11-20020918 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index fb84cba05..8de67f0b4 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -6419,7 +6419,6 @@ Apologies for any names omitted. 20020513 - Bugfix: the LDAP client used the "wrong" @ character in addresses with multiple @. LaMont Jones, HP. File: util/dict_ldap.c. @@ -6969,6 +6968,16 @@ Apologies for any names omitted. compiled in if the PCRE library code is found under /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: Low: smtpd should log queue ID with reject/warn/hold/discard diff --git a/postfix/html/postsuper.1.html b/postfix/html/postsuper.1.html index ed5368959..4bafed3de 100644 --- a/postfix/html/postsuper.1.html +++ b/postfix/html/postsuper.1.html @@ -5,8 +5,8 @@ POSTSUPER(1) POSTSUPER(1) postsuper - Postfix superintendent SYNOPSIS - postsuper [-psv] [-d queue_id] [-h queue_id] [-H queue_id] - [-r queue_id] [directory ...] + postsuper [-cpsv] [-d queue_id] [-h queue_id] [-H + queue_id] [-r queue_id] [directory ...] DESCRIPTION The postsuper command does maintenance jobs on the Postfix @@ -20,12 +20,18 @@ POSTSUPER(1) POSTSUPER(1) Options: + -c config_dir + The main.cf configuration file is in the named + directory instead of the default configuration + directory. See also the MAIL_CONFIG environment + setting below. + -d queue_id Delete one message with the named queue ID from the - named mail queue(s) (default: hold, incoming, + named mail queue(s) (default: hold, incoming, active and deferred). If a queue_id of - is speci- - fied, the program reads queue IDs from standard - input. For example, to delete all mail from or to + fied, the program reads queue IDs from standard + input. For example, to delete all mail from or to user@example.com: mailq | awk 'BEGIN { RS = "" } \ @@ -33,137 +39,141 @@ POSTSUPER(1) POSTSUPER(1) ' | tr -d '*!' | postsuper -d - Specify -d ALL to remove all messages; for example, - specify -d ALL deferred to delete mail in the - deferred queue. As a safety measure, the word ALL + specify -d ALL deferred to delete mail in the + deferred queue. As a safety measure, the word ALL must be specified in upper case. - Postfix queue IDs are reused. There is a very - small possibility that postsuper deletes the wrong - message file when it is executed while the Postfix + Postfix queue IDs are reused. There is a very + small possibility that postsuper deletes the wrong + message file when it is executed while the Postfix mail system is running. The scenario is as follows: - 1) The Postfix queue manager deletes the mes- - sage that postsuper is supposed to delete, - because Postfix is finished with the mes- + 1) The Postfix queue manager deletes the mes- + sage that postsuper is supposed to delete, + because Postfix is finished with the mes- sage. - 2) New mail arrives, and the new message is - given the same queue ID as the message that + 2) New mail arrives, and the new message is + given the same queue ID as the message that postsuper is supposed to delete. The proba- - bility for reusing a deleted queue ID is - about 1 in 2**15 (the number of different + bility for reusing a deleted queue ID is + about 1 in 2**15 (the number of different microsecond values that the system clock can distinguish within a second). - 3) postsuper deletes the new message, instead - of the old message that it should have + 3) postsuper deletes the new message, instead + of the old message that it should have deleted. -h queue_id - Put mail "on hold" so that no attempt is made to - deliver it. Move one message with the named queue + Put mail "on hold" so that no attempt is made to + deliver it. Move one message with the named queue ID from the named mail queue(s) (default: incoming, - active and deferred) to the hold queue. If a + active and deferred) to the hold queue. If a queue_id of - is specified, the program reads queue IDs from standard input. - Specify -h ALL to hold all messages; for example, + Specify -h ALL to hold all messages; for example, specify -h ALL deferred to hold mail in the - deferred queue. As a safety measure, the word ALL + deferred queue. As a safety measure, the word ALL must be specified in upper case. - Note: mail that is put "on hold" will not expire - when its time in the queue exceeds the maxi- + Note: mail that is put "on hold" will not expire + when its time in the queue exceeds the maxi- mal_queue_lifetime setting. -H queue_id 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: hold) to the deferred queue. If - a queue_id of - is specified, the program reads + a queue_id of - is specified, the program reads queue IDs from standard input. - Specify -H ALL to release all mail that is "on - hold". As a safety measure, the word ALL must be + Specify -H ALL to release all mail that is "on + hold". As a safety measure, the word ALL must be specified in upper case. - -p Purge old temporary files that are left over after + -p Purge old temporary files that are left over after system or software crashes. -r queue_id - Requeue the message with the named queue ID from - the named mail queue(s) (default: hold, incoming, - active and deferred). To requeue multiple mes- - sages, specify multiple -r command-line options. + Requeue the message with the named queue ID from + the named mail queue(s) (default: hold, incoming, + active and deferred). To requeue multiple mes- + sages, specify multiple -r command-line options. Alternatively, if a queue_id of - is specified, the program reads queue IDs from standard input. Specify -r ALL to requeue all messages. As a safety - measure, the word ALL must be specified in upper + measure, the word ALL must be specified in upper case. - A requeued message is moved to the maildrop queue, - from where it is copied by the pickup daemon to a - new file whose name is guaranteed to match the new + A requeued message is moved to the maildrop queue, + from where it is copied by the pickup daemon to a + new file whose name is guaranteed to match the new 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- 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 postsuper 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. -s Structure check and structure repair. It is highly - recommended to perform this operation once before + recommended to perform this operation once before Postfix startup. - o Rename files whose name does not match the + o Rename files whose name does not match the 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. o Move queue files that are in the wrong place in the file system hierarchy and remove sub- directories that are no longer needed. File - position rearrangements are necessary after + position rearrangements are necessary after a change in the hash_queue_names and/or hash_queue_depth configuration parameters. -v Enable verbose logging for debugging purposes. Mul- - tiple -v options make the software increasingly + tiple -v options make the software increasingly verbose. DIAGNOSTICS - Problems are reported to the standard error stream and to + Problems are reported to the standard error stream and to syslogd. - postsuper reports the number of messages deleted with -d, + postsuper reports the number of messages deleted with -d, the number of messages requeued with -r, and the number of - messages whose queue file name was fixed with -s. The + messages whose queue file name was fixed with -s. The report is written to the standard error stream and to sys- logd. +ENVIRONMENT + MAIL_CONFIG + Directory with the main.cf file. + BUGS - Mail that is not sanitized by Postfix (i.e. mail in the + Mail that is not sanitized by Postfix (i.e. mail in the maildrop queue) cannot be placed "on hold". CONFIGURATION PARAMETERS - See the Postfix main.cf file for syntax details and for + See the Postfix main.cf file for syntax details and for default values. hash_queue_depth Number of subdirectory levels for hashed queues. hash_queue_names - The names of queues that are organized into multi- + The names of queues that are organized into multi- ple levels of subdirectories. LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) diff --git a/postfix/man/man1/postsuper.1 b/postfix/man/man1/postsuper.1 index ecb6d5ee0..f5074b87c 100644 --- a/postfix/man/man1/postsuper.1 +++ b/postfix/man/man1/postsuper.1 @@ -9,7 +9,7 @@ Postfix superintendent .na .nf .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-r \fIqueue_id\fR] [\fIdirectory ...\fR] .SH DESCRIPTION @@ -25,6 +25,10 @@ directories - this includes the \fBincoming\fR, \fBactive\fR and \fBdefer\fR and \fBflush\fR directories with log files. 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" Delete one message with the named queue ID from the named 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 messages whose queue file name was fixed with \fB-s\fR. The report 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 .ad .fi diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index f912a87f1..a16e7f030 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * 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 "20020917" +#define MAIL_RELEASE_DATE "20020918" #define VAR_MAIL_VERSION "mail_version" #define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE diff --git a/postfix/src/pickup/pickup.c b/postfix/src/pickup/pickup.c index 9b3dba8d3..0e865de29 100644 --- a/postfix/src/pickup/pickup.c +++ b/postfix/src/pickup/pickup.c @@ -212,15 +212,17 @@ static int copy_segment(VSTREAM *qfile, VSTREAM *cleanup, PICKUP_INFO *info, } continue; } - if (type == REC_TYPE_RRTO) + if (type == REC_TYPE_RRTO) /* Use message header extracted information instead. */ continue; - if (type == REC_TYPE_ERTO) + if (type == REC_TYPE_ERTO) /* Use message header extracted information instead. */ 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; - if (type == REC_TYPE_FILT && info->st.st_uid != var_owner_uid) + if (type == REC_TYPE_FILT) + /* Use current content filter settings instead. */ continue; else { diff --git a/postfix/src/postsuper/postsuper.c b/postfix/src/postsuper/postsuper.c index 23dcc645d..c74679671 100644 --- a/postfix/src/postsuper/postsuper.c +++ b/postfix/src/postsuper/postsuper.c @@ -5,7 +5,7 @@ /* Postfix superintendent /* SYNOPSIS /* .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-r \fIqueue_id\fR] [\fIdirectory ...\fR] /* DESCRIPTION @@ -19,6 +19,10 @@ /* \fBdefer\fR and \fBflush\fR directories with log files. /* /* 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" /* Delete one message with the named queue ID from the named /* 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 /* messages whose queue file name was fixed with \fB-s\fR. The report /* 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 /* Mail that is not sanitized by Postfix (i.e. mail in the \fBmaildrop\fR /* 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 * hold_one() routine, this code does not touch logfiles, and * must not touch files in the maildrop queue, because maildrop - * files contain data that has not yet been sanitized and therefore - * must not be mixed with already sanitized mail. + * files contain data that has not yet been sanitized and + * therefore must not be mixed with already sanitized mail. */ if ((action & ACTION_HOLD_ALL) && MESSAGE_QUEUE(qp) diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index 66f4a97d0..08c5bf949 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -1407,6 +1407,13 @@ static void smtpd_proto(SMTPD_STATE *state) break; 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 (;;) { if (state->error_count > var_smtpd_hard_erlim) { state->reason = "too many errors"; @@ -1508,24 +1515,13 @@ static void smtpd_service(VSTREAM *stream, char *unused_service, char **argv) * machines. */ 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. */ 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. */