diff --git a/postfix/HISTORY b/postfix/HISTORY index e628635d8..7137d82c4 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -16736,5 +16736,12 @@ Apologies for any names omitted. which changes once every year or so, a problem that was reported by Victor Duchovni. The base 16 encoding gives finer control over the number of directories than possible - with base 52 encoding. Files: global/mail_queue.c. This + with base 52 encoding. Files: global/mail_queue.[hc]. This change requires "postfix reload". + +20110322 + + Cleanup: preserve the microseconds value when renaming + long->short or short->short queue file names. As a side + benefit, renaming long->short queue IDs will not change the + result from queue hashing. File: postsuper/postsuper.c. diff --git a/postfix/README_FILES/BACKSCATTER_README b/postfix/README_FILES/BACKSCATTER_README index 90ac32a89..21f243644 100644 --- a/postfix/README_FILES/BACKSCATTER_README +++ b/postfix/README_FILES/BACKSCATTER_README @@ -107,7 +107,7 @@ this: body_checks = pcre:/etc/postfix/body_checks /etc/postfix/header_checks: - # Do not indent the text between "if" and "endif". + # Do not indent the patterns between "if" and "endif". if /^Received:/ /^Received: +from +(porcupine\.org) +/ reject forged client name in Received: header: $1 @@ -122,7 +122,7 @@ this: reject forged domain name in Message-ID: header: $1 /etc/postfix/body_checks: - # Do not indent the text between "if" and "endif". + # Do not indent the patterns between "if" and "endif". if /^[> ]*Received:/ /^[> ]*Received: +from +(porcupine\.org) / reject forged client name in Received: header: $1 diff --git a/postfix/html/BACKSCATTER_README.html b/postfix/html/BACKSCATTER_README.html index 7ab4ea1e4..631e15235 100644 --- a/postfix/html/BACKSCATTER_README.html +++ b/postfix/html/BACKSCATTER_README.html @@ -184,7 +184,7 @@ patterns like this:
body_checks = pcre:/etc/postfix/body_checks /etc/postfix/header_checks: - # Do not indent the text between "if" and "endif". + # Do not indent the patterns between "if" and "endif". if /^Received:/ /^Received: +from +(porcupine\.org) +/ reject forged client name in Received: header: $1 @@ -198,7 +198,7 @@ patterns like this: reject forged domain name in Message-ID: header: $1 /etc/postfix/body_checks: - # Do not indent the text between "if" and "endif". + # Do not indent the patterns between "if" and "endif". if /^[> ]*Received:/ /^[> ]*Received: +from +(porcupine\.org) / reject forged client name in Received: header: $1 diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index 787d87507..230106a9c 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -13895,7 +13895,7 @@ Examples:The internal service that postscreen(8) forwards allowed +
The internal service that postscreen(8) hands off allowed connections to. In a future version there may be different classes of SMTP service.
diff --git a/postfix/html/postscreen.8.html b/postfix/html/postscreen.8.html index 3d5716590..c349b8cc3 100644 --- a/postfix/html/postscreen.8.html +++ b/postfix/html/postscreen.8.html @@ -225,7 +225,7 @@ POSTSCREEN(8) POSTSCREEN(8) seconds otherwise). smtpd_service_name (smtpd) - The internal service that postscreen(8) forwards + The internal service that postscreen(8) hands off allowed connections to. AFTER-GREETING TESTS diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5 index 06f3839ea..aa2c20f6d 100644 --- a/postfix/man/man5/postconf.5 +++ b/postfix/man/man5/postconf.5 @@ -8765,7 +8765,7 @@ smtpd_sender_restrictions = reject_unknown_sender_domain, .ad .ft R .SH smtpd_service_name (default: smtpd) -The internal service that \fBpostscreen\fR(8) forwards allowed +The internal service that \fBpostscreen\fR(8) hands off allowed connections to. In a future version there may be different classes of SMTP service. .PP diff --git a/postfix/man/man8/postscreen.8 b/postfix/man/man8/postscreen.8 index e2f73bcae..55e4a3aec 100644 --- a/postfix/man/man8/postscreen.8 +++ b/postfix/man/man8/postscreen.8 @@ -222,7 +222,7 @@ client to send a command before its turn, and for DNS blocklist lookup results to arrive (default: up to 2 seconds under stress, up to 6 seconds otherwise). .IP "\fBsmtpd_service_name (smtpd)\fR" -The internal service that \fBpostscreen\fR(8) forwards allowed +The internal service that \fBpostscreen\fR(8) hands off allowed connections to. .SH "AFTER-GREETING TESTS" .na diff --git a/postfix/proto/BACKSCATTER_README.html b/postfix/proto/BACKSCATTER_README.html index 1fd55311b..855e4aa43 100644 --- a/postfix/proto/BACKSCATTER_README.html +++ b/postfix/proto/BACKSCATTER_README.html @@ -184,7 +184,7 @@ patterns like this: body_checks = pcre:/etc/postfix/body_checks /etc/postfix/header_checks: - # Do not indent the text between "if" and "endif". + # Do not indent the patterns between "if" and "endif". if /^Received:/ /^Received: +from +(porcupine\.org) +/ reject forged client name in Received: header: $1 @@ -198,7 +198,7 @@ patterns like this: reject forged domain name in Message-ID: header: $1 /etc/postfix/body_checks: - # Do not indent the text between "if" and "endif". + # Do not indent the patterns between "if" and "endif". if /^[> ]*Received:/ /^[> ]*Received: +from +(porcupine\.org) / reject forged client name in Received: header: $1 diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index 09cdae561..11ba89459 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -12615,7 +12615,7 @@ patch for Postfix 2.6. %PARAM smtpd_service_name smtpd -The internal service that postscreen(8) forwards allowed +
The internal service that postscreen(8) hands off allowed connections to. In a future version there may be different classes of SMTP service.
diff --git a/postfix/src/global/mail_queue.h b/postfix/src/global/mail_queue.h index a8c7c64ba..cc0d642cc 100644 --- a/postfix/src/global/mail_queue.h +++ b/postfix/src/global/mail_queue.h @@ -101,8 +101,8 @@ extern int mail_queue_id_ok(const char *); #define MQID_LG_INUM_PAD 0 /* no padding needed */ #define MQID_FIND_LG_INUM_SEPARATOR(cp, path) \ - ((cp) = strrchr((path), MQID_LG_INUM_SEP)) != 0 \ - && ((cp) - (path) >= MQID_LG_TIME_PAD) + (((cp) = strrchr((path), MQID_LG_INUM_SEP)) != 0 \ + && ((cp) - (path) >= MQID_LG_TIME_PAD)) #define MQID_GET_INUM(path, inum, long_form, error) do { \ char *_cp; \ diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index c463c626a..e2beacd03 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20110321" +#define MAIL_RELEASE_DATE "20110322" #define MAIL_VERSION_NUMBER "2.9" #ifdef SNAPSHOT diff --git a/postfix/src/postscreen/postscreen.c b/postfix/src/postscreen/postscreen.c index 4776a274d..609963178 100644 --- a/postfix/src/postscreen/postscreen.c +++ b/postfix/src/postscreen/postscreen.c @@ -196,7 +196,7 @@ /* lookup results to arrive (default: up to 2 seconds under stress, /* up to 6 seconds otherwise). /* .IP "\fBsmtpd_service_name (smtpd)\fR" -/* The internal service that \fBpostscreen\fR(8) forwards allowed +/* The internal service that \fBpostscreen\fR(8) hands off allowed /* connections to. /* AFTER-GREETING TESTS /* .ad diff --git a/postfix/src/postsuper/postsuper.c b/postfix/src/postsuper/postsuper.c index ea513ddf9..c8ebb947d 100644 --- a/postfix/src/postsuper/postsuper.c +++ b/postfix/src/postsuper/postsuper.c @@ -673,14 +673,20 @@ static int fix_queue_id(const char *actual_path, const char *actual_queue, * be deterministic so that we can recover even when the renaming * operation is interrupted in the middle. */ - if (MQID_FIND_LG_INUM_SEPARATOR(cp, actual_id) && var_long_queue_ids) { + if (MQID_FIND_LG_INUM_SEPARATOR(cp, actual_id) == 0) { + /* Short->short queue ID. Replace the inode portion. */ + vstring_sprintf(new_id, "%.*s%s", + MQID_SH_USEC_PAD, actual_id, + get_file_id_st(st, 0)); + } else if (var_long_queue_ids) { + /* Long->long queue ID. Replace the inode portion. */ vstring_sprintf(new_id, "%.*s%c%s", (int) (cp - actual_id), actual_id, MQID_LG_INUM_SEP, get_file_id_st(st, 1)); } else { - vstring_sprintf(new_id, "%0*X%s", - MQID_SH_USEC_PAD, myrand() % 1000000, - get_file_id_st(st, 0)); + /* Long->short queue ID. Reformat time and replace inode portion. */ + MQID_LG_GET_HEX_USEC(new_id, cp); + vstring_strcat(new_id, get_file_id_st(st, 0)); } /*