From: Wietse Venema Date: Sun, 26 Jan 2003 05:00:00 +0000 (-0500) Subject: postfix-2.0.3-20030126 X-Git-Tag: v2.1-RC1-20040331~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac81ca94c7141c1dfe23e2aa5f32dbb415355d70;p=thirdparty%2Fpostfix.git postfix-2.0.3-20030126 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index af0d3efe2..b22edd068 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -7812,6 +7812,11 @@ Apologies for any names omitted. smtpd/smtpd_check.c, cleanup/cleanup_message.c, *qmgr/qmgr_message.c. +20030126 + + Update: maildir filename algorithm updated according to + today's version of http://cr.yp.to/proto/maildir.html. + Open problems: Med: make qmgr recipient bounce/defer activity asynchronous diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 342194db4..f4765c11f 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -43,6 +43,20 @@ SPAM to the beneficiaries of an advertisement campaign. It would have helped when someone began spamming the network with sender addresses in one of my domains, and I got all the bounces. +Incompatible changes with Postfix snapshot 2.0.3-20030126 +========================================================= + +The maildir file naming algorithm has changed in accordance with +an updated version of http://cr.yp.to/proto/maildir.html. The name +is now TIME.VdevIinum.HOST + +Incompatible changes with Postfix snapshot 2.0.3-20030124 +========================================================= + +The maildir file naming algorithm has changed. Pending a usable +version of http://cr.yp.to/proto/maildir.html, the name is now +TIME.DEV_INUM.HOST. + Incompatible changes with Postfix snapshot 2.0.1-20030112 ========================================================= diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 718590173..ea4eda2be 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 "20030125" +#define MAIL_RELEASE_DATE "20030126" #define VAR_MAIL_VERSION "mail_version" #define DEF_MAIL_VERSION "2.0.3-" MAIL_RELEASE_DATE diff --git a/postfix/src/local/maildir.c b/postfix/src/local/maildir.c index ff029518a..b9f537c93 100644 --- a/postfix/src/local/maildir.c +++ b/postfix/src/local/maildir.c @@ -141,11 +141,41 @@ int deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr, char *path) * the file to new/ we use the device number and inode number. I do not * care if this breaks on a remote AFS file system, because people should * know better. + * + * On January 26, 2003, http://cr.yp.to/proto/maildir.html said: + * + * A unique name has three pieces, separated by dots. On the left is the + * result of time() or the second counter from gettimeofday(). On the + * right is the result of gethostname(). (To deal with invalid host + * names, replace / with \057 and : with \072.) In the middle is a + * delivery identifier, discussed below. + * + * [...] + * + * Modern delivery identifiers are created by concatenating enough of the + * following strings to guarantee uniqueness: + * + * [...] + * + * In, where n is (in hexadecimal) the UNIX inode number of this file. + * Unfortunately, inode numbers aren't always available through NFS. + * + * Vn, where n is (in hexadecimal) the UNIX device number of this file. + * Unfortunately, device numbers aren't always available through NFS. + * (Device numbers are also not helpful with the standard UNIX + * filesystem: a maildir has to be within a single UNIX device for link() + * and rename() to work.) + * + * [...] + * + * # Pn, where n is (in decimal) the process ID. + * + * [...] */ #define STR vstring_str set_eugid(usr_attr.uid, usr_attr.gid); - vstring_sprintf(buf, "%lu.%d.%s", + vstring_sprintf(buf, "%lu.P%d.%s", (unsigned long) starttime, var_pid, get_hostname()); tmpfile = concatenate(tmpdir, STR(buf), (char *) 0); newfile = 0; @@ -157,7 +187,7 @@ int deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr, char *path) } else if (fstat(vstream_fileno(dst), &st) < 0) { vstring_sprintf(why, "create %s: %m", tmpfile); } else { - vstring_sprintf(buf, "%lu.%lu_%lu.%s", + vstring_sprintf(buf, "%lu.V%lxI%lx.%s", (unsigned long) starttime, (unsigned long) st.st_dev, (unsigned long) st.st_ino, get_hostname()); newfile = concatenate(newdir, STR(buf), (char *) 0); diff --git a/postfix/src/virtual/maildir.c b/postfix/src/virtual/maildir.c index ecd0e83ad..0d435083d 100644 --- a/postfix/src/virtual/maildir.c +++ b/postfix/src/virtual/maildir.c @@ -138,11 +138,41 @@ int deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr) * the file to new/ we use the device number and inode number. I do not * care if this breaks on a remote AFS file system, because people should * know better. + * + * On January 26, 2003, http://cr.yp.to/proto/maildir.html said: + * + * A unique name has three pieces, separated by dots. On the left is the + * result of time() or the second counter from gettimeofday(). On the + * right is the result of gethostname(). (To deal with invalid host + * names, replace / with \057 and : with \072.) In the middle is a + * delivery identifier, discussed below. + * + * [...] + * + * Modern delivery identifiers are created by concatenating enough of the + * following strings to guarantee uniqueness: + * + * [...] + * + * In, where n is (in hexadecimal) the UNIX inode number of this file. + * Unfortunately, inode numbers aren't always available through NFS. + * + * Vn, where n is (in hexadecimal) the UNIX device number of this file. + * Unfortunately, device numbers aren't always available through NFS. + * (Device numbers are also not helpful with the standard UNIX + * filesystem: a maildir has to be within a single UNIX device for link() + * and rename() to work.) + * + * [...] + * + * # Pn, where n is (in decimal) the process ID. + * + * [...] */ #define STR vstring_str set_eugid(usr_attr.uid, usr_attr.gid); - vstring_sprintf(buf, "%lu.%d.%s", + vstring_sprintf(buf, "%lu.P%d.%s", (unsigned long) starttime, var_pid, get_hostname()); tmpfile = concatenate(tmpdir, STR(buf), (char *) 0); newfile = 0; @@ -154,7 +184,7 @@ int deliver_maildir(LOCAL_STATE state, USER_ATTR usr_attr) } else if (fstat(vstream_fileno(dst), &st) < 0) { vstring_sprintf(why, "create %s: %m", tmpfile); } else { - vstring_sprintf(buf, "%lu.%lu_%lu.%s", + vstring_sprintf(buf, "%lu.V%lxI%lx.%s", (unsigned long) starttime, (unsigned long) st.st_dev, (unsigned long) st.st_ino, get_hostname()); newfile = concatenate(newdir, STR(buf), (char *) 0);