]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.0.3-20030126
authorWietse Venema <wietse@porcupine.org>
Sun, 26 Jan 2003 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:28:44 +0000 (06:28 +0000)
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/src/global/mail_version.h
postfix/src/local/maildir.c
postfix/src/virtual/maildir.c

index af0d3efe2e32752d2bd8452b7c5dc79014829d2f..b22edd068a95d3e0cbfe4c5c713f7698fabcb42a 100644 (file)
@@ -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
index 342194db452c4f933c558caec6c6f5067c4026e6..f4765c11fbe03646bf05a8373ca3b09d730b67b7 100644 (file)
@@ -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
 =========================================================
 
index 718590173fc2140d03ef359360da9b8160600f40..ea4eda2bed2d0aeaf3b46be5038b0b8930984b73 100644 (file)
@@ -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
index ff029518aa228551d461a98d46f71a6c61f8a1bf..b9f537c9365436333f45af84968aa42b7ff5c9b8 100644 (file)
@@ -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);
index ecd0e83ad72e6c3e2940274964882e9caac8df65..0d435083d3291a0681c579999be20dc551ec6e88 100644 (file)
@@ -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);