]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20010202
authorWietse Venema <wietse@porcupine.org>
Fri, 2 Feb 2001 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:09 +0000 (06:27 +0000)
12 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/html/faq.html
postfix/html/local.8.html
postfix/html/virtual.8.html
postfix/man/man8/local.8
postfix/man/man8/virtual.8
postfix/src/global/mail_version.h
postfix/src/local/local.c
postfix/src/master/master.c
postfix/src/util/rand_sleep.c
postfix/src/virtual/virtual.c

index bba61fb249174027d1ded5b8a66b9c42b1e4fdbb..8f095ce1c9e344106ec36e3f58b7af8d152823c3 100644 (file)
@@ -4848,3 +4848,15 @@ Apologies for any names omitted.
        util/sane_time.[hc].
 
        Bumped the default mailbox file size limits to 50MB.
+
+20010202
+
+       Bugfix: fixed the way the master resets the file size limit
+       to avoid problems when a Postfix daemon updates a queue
+       file.  The file size limit is now increased to INT_MAX if
+       it is smaller than INT_MAX, so that it is less likely to
+       interfere than the old setting of message_size_limit.
+
+       Feature: disable mailbox size limits for the local and
+       virtual delivery agents by setting mailbox_size_limit or
+       virtual_mailbox_limit to zero.
index 26fab01801c759e4bba0a8e000aafd63c95a6745..a1c31ed58403d8ba2331b29fac8d6835a683fcbf 100644 (file)
@@ -1,15 +1,28 @@
 Apart from bugfixes this is expected to become the first non-beta
 Postfix release.
 
+Major changes with snapshot-20010202
+====================================
+
+The mailbox file size limits for the local and virtual delivery
+agents can be disabled by setting mailbox_size_limit and/or
+virtual_mailbox_limit to zero.
+
 Incompatible changes with snapshot-20010128
 ===========================================
 
+If this release does not work for you, you can go back to a previous
+Postfix version without losing your mail, subject to the "incompatible
+changes" listed for previous Postfix releases below.
+
 REJECT in header/body_checks is now flagged as policy violation
 rather than bounce, for consistency in postmaster notifications.
 
-The mailbox size limit for local delivery is no longer controlled
-by the message_size_limit paramater, but by a separate parameter
-called mailbox_size_limit (default: 20MBytes).
+New mailbox size limit for local delivery (default: 50MBytes). This
+limit affects all file write access by the local delivery agent or
+by a process run by the local delivery agent. The purpose of this
+parameter is to act as a safety for run-away software. It cannot
+be a substitute for a file quota management system.
 
 The default RBL (real-time blackhole lists) domain examples have
 been updated from *.vix.com to *.mail-abuse.org.
@@ -27,7 +40,7 @@ agent can deliver mail for any number of domains.  See the file
 VIRTUAL_README for detailed examples. This code is still new. Once
 it stops changing it will become part of the non-beta release.
 
-Many "valid_hostname" warnings were eliminated. The complaints that
+Many "valid_hostname" warnings were eliminated. The warnings that
 were not eliminated were replaced by something more informative.
 
 SASL support (RFC 2554) for the LMTP delivery agent. This is required
index 1cfd0b911131d59553013a6b20011e78074f162c..e8919e7ca68b1ed0c88931cebcd7f55a84b03927 100644 (file)
@@ -1319,7 +1319,7 @@ be a broken PIX firewall.
 
 <h4>Cisco PIX "fixup protocol smtp" bug</h4>
 
-The Cisco PIX has have a bug when running software older than
+The Cisco PIX firewall has a bug when running software older than
 version 5.2(4) or 6.0(1).
 
 <p>
@@ -1333,7 +1333,7 @@ end of mail are sent in separate packets.
 How does one recognize a mailer behind a Cisco PIX with "fixup
 protocol smtp" enabled? As of version 5.1 and later, the fixup
 protocol smtp command changes the characters in the SMTP banner to
-asterisks except for the "2", "0", "0" and space characters. 
+asterisks except for the "2", "0" and "0 SPACE" characters. 
 
 <p>
 
index 1b0ba3c609f61dfae8297815e0de836236f4838d..5aac19255773d2d7007ead1bf91f9516aec22b34 100644 (file)
@@ -451,9 +451,9 @@ LOCAL(8)                                                 LOCAL(8)
 
        <b>mailbox</b><i>_</i><b>size</b><i>_</i><b>limit</b>
               Limit the size of a mailbox  etc.  file  (any  file
-              that is written to upon delivery).
+              that  is written to upon delivery).  Set to zero to
+              disable the limit.
 
-<b>Security</b> <b>controls</b>
 
 
 
@@ -467,33 +467,34 @@ LOCAL(8)                                                 LOCAL(8)
 LOCAL(8)                                                 LOCAL(8)
 
 
+<b>Security</b> <b>controls</b>
        <b>allow</b><i>_</i><b>mail</b><i>_</i><b>to</b><i>_</i><b>commands</b>
-              Restrict  the  usage  of  mail delivery to external
+              Restrict the usage of  mail  delivery  to  external
               command.
 
        <b>allow</b><i>_</i><b>mail</b><i>_</i><b>to</b><i>_</i><b>files</b>
-              Restrict the usage of  mail  delivery  to  external
+              Restrict  the  usage  of  mail delivery to external
               file.
 
        <b>command</b><i>_</i><b>expansion</b><i>_</i><b>filter</b>
-              What  characters  are  allowed  to  appear in $name
-              expansions of mailbox_command.  Illegal  characters
+              What characters are  allowed  to  appear  in  $name
+              expansions  of  mailbox_command. Illegal characters
               are replaced by underscores.
 
        <b>default</b><i>_</i><b>privs</b>
-              Default  rights  for  delivery  to external file or
+              Default rights for delivery  to  external  file  or
               command.
 
        <b>forward</b><i>_</i><b>expansion</b><i>_</i><b>filter</b>
-              What characters are  allowed  to  appear  in  $name
-              expansions  of forward_path. Illegal characters are
+              What  characters  are  allowed  to  appear in $name
+              expansions of forward_path. Illegal characters  are
               replaced by underscores.
 
 <b>HISTORY</b>
-       The <b>Delivered-To:</b> header appears in the  <b>qmail</b>  system  by
+       The  <b>Delivered-To:</b>  header  appears in the <b>qmail</b> system by
        Daniel Bernstein.
 
-       The  <i>maildir</i>  structure  appears  in  the  <b>qmail</b> system by
+       The <i>maildir</i> structure  appears  in  the  <b>qmail</b>  system  by
        Daniel Bernstein.
 
 <b>SEE</b> <b>ALSO</b>
@@ -504,7 +505,7 @@ LOCAL(8)                                                 LOCAL(8)
        <a href="qmgr.8.html">qmgr(8)</a> queue manager
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
@@ -523,7 +524,6 @@ LOCAL(8)                                                 LOCAL(8)
 
 
 
-
                                                                 8
 
 
index 43ee3df0b36a78ebcd13702d085aa61aaa0365aa..82c47ede1d8d8d825151f57c93a7cb41046e7160 100644 (file)
@@ -224,7 +224,7 @@ VIRTUAL(8)                                             VIRTUAL(8)
 
        <b>virtual</b><i>_</i><b>mailbox</b><i>_</i><b>limit</b>
               The  maximal  size in bytes of a mailbox or maildir
-              file.
+              file.  Set to zero to disable the limit.
 
 <b>HISTORY</b>
        This agent was  originally  based  on  the  Postfix  local
index 3d10429a6bdb4f8cb1d766bb3ad89df3acc4a37f..8f3806515c540fbf40b6d8c86aa2e9c17c71fe68 100644 (file)
@@ -378,6 +378,7 @@ The default limit is taken from the
 .IP \fBmailbox_size_limit\fR
 Limit the size of a mailbox etc. file (any file that is
 written to upon delivery).
+Set to zero to disable the limit.
 .SH "Security controls"
 .ad
 .fi
index 994bd71dcde738eb78f08704cb5c4b46b2515229..52b1fbe7508beda19f488fb7b4dfc9d224c513b5 100644 (file)
@@ -191,6 +191,7 @@ The default limit is taken from the
 The limit is enforced by the Postfix queue manager.
 .IP \fBvirtual_mailbox_limit\fR
 The maximal size in bytes of a mailbox or maildir file.
+Set to zero to disable the limit.
 .SH HISTORY
 .na
 .nf
index 3564c0b1e76f09db9e25efbaa1f1bd32c7d93a2d..82f068e6d1f434805dc43f3346bfc16401422ab9 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20010201"
+#define DEF_MAIL_VERSION       "Snapshot-20010202"
 extern char *var_mail_version;
 
 /* LICENSE
index 6d6bd05d48c06af1131bca045c7c78bb9e18ec5d..068d61e081c3429ea38b3b09429f1702fdd27379 100644 (file)
 /* .IP \fBmailbox_size_limit\fR
 /*     Limit the size of a mailbox etc. file (any file that is
 /*     written to upon delivery).
+/*     Set to zero to disable the limit.
 /* .SH "Security controls"
 /* .ad
 /* .fi
@@ -635,14 +636,20 @@ static void pre_init(char *unused_name, char **unused_argv)
      * size limit. XXX This still isn't accurate because the file size limit
      * also affects delivery to command.
      * 
+     * A file size limit protects the machine against runaway software errors.
+     * It is not suitable to enfoce mail quota, because users can get around
+     * mail quota by delivering to /file/name or to |command.
+     * 
      * We can't have mailbox size limit smaller than the message size limit,
      * because that prohibits the delivery agent from updating the queue
      * file.
      */
-    if (var_mailbox_limit < var_message_limit)
-       msg_fatal("main.cf configuration error: %s is smaller than %s",
-                 VAR_MAILBOX_LIMIT, VAR_MESSAGE_LIMIT);
-    set_file_limit(var_mailbox_limit);
+    if (var_mailbox_limit) {
+       if (var_mailbox_limit < var_message_limit)
+           msg_fatal("main.cf configuration error: %s is smaller than %s",
+                     VAR_MAILBOX_LIMIT, VAR_MESSAGE_LIMIT);
+       set_file_limit(var_mailbox_limit);
+    }
 }
 
 /* main - pass control to the single-threaded skeleton */
@@ -655,7 +662,7 @@ int     main(int argc, char **argv)
     };
     static CONFIG_INT_TABLE int_table[] = {
        VAR_DUP_FILTER_LIMIT, DEF_DUP_FILTER_LIMIT, &var_dup_filter_limit, 0, 0,
-       VAR_MAILBOX_LIMIT, DEF_MAILBOX_LIMIT, &var_mailbox_limit, 1, 0,
+       VAR_MAILBOX_LIMIT, DEF_MAILBOX_LIMIT, &var_mailbox_limit, 0, 0,
        0,
     };
     static CONFIG_STR_TABLE str_table[] = {
index 2967d914f8cf03ac1f85152ae2686bda26683b20..c7dead391fb93e6c1133846fecdc8ac42c4cf2d0 100644 (file)
 #include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
+#include <limits.h>
 
 /* Utility library. */
 
@@ -288,11 +289,9 @@ int     main(int argc, char **argv)
     clean_env(import_env->argv);
     argv_free(import_env);
 
-    if ((inherited_limit = get_file_limit()) < (off_t) var_message_limit) {
-       msg_warn("file size limit %lu < message_size_limit %lu -- reset",
-       (unsigned long) inherited_limit, (unsigned long) var_message_limit);
-       set_file_limit(var_message_limit);
-    }
+    if ((inherited_limit = get_file_limit()) < (off_t) INT_MAX)
+       set_file_limit(INT_MAX);
+
     if (chdir(var_queue_dir))
        msg_fatal("chdir %s: %m", var_queue_dir);
 
index 079324b490d9be411b64c478db51cec8fd8f470c..ecc051fdba9f0153a549cef4a2cefded3642194a 100644 (file)
@@ -67,7 +67,7 @@ void    rand_sleep(unsigned delay, unsigned variation)
      * Use the semi-crappy random number generator.
      */
     if (my_pid == 0)
-       srandom(my_pid = (getpid() ^ time((time_t *) 0)));
+       srandom((my_pid = getpid()) ^ time((time_t *) 0));
     usec = (delay - variation / 2) + variation * (double) random() / RAND_MAX;
     doze(usec);
 }
index 8404ad1e2b6abef3d5208311c9159389ec9c53ca..86809ace59224463729352e40190e63e5d44e366 100644 (file)
 /*     The limit is enforced by the Postfix queue manager.
 /* .IP \fBvirtual_mailbox_limit\fR
 /*     The maximal size in bytes of a mailbox or maildir file.
+/*     Set to zero to disable the limit.
 /* HISTORY
 /* .ad
 /* .fi
@@ -368,17 +369,18 @@ static void pre_init(char *unused_name, char **unused_argv)
 
     /*
      * Reset the file size limit from the message size limit to the mailbox
-     * size limit. XXX This still isn't accurate because the file size limit
-     * also affects delivery to command.
+     * size limit.
      * 
      * We can't have mailbox size limit smaller than the message size limit,
      * because that prohibits the delivery agent from updating the queue
      * file.
      */
-    if (var_virt_mailbox_limit < var_message_limit)
-       msg_fatal("main.cf configuration error: %s is smaller than %s",
-                 VAR_VIRT_MAILBOX_LIMIT, VAR_MESSAGE_LIMIT);
-    set_file_limit(var_virt_mailbox_limit);
+    if (var_virt_mailbox_limit) {
+       if (var_virt_mailbox_limit < var_message_limit)
+           msg_fatal("main.cf configuration error: %s is smaller than %s",
+                     VAR_VIRT_MAILBOX_LIMIT, VAR_MESSAGE_LIMIT);
+       set_file_limit(var_virt_mailbox_limit);
+    }
 }
 
 /* main - pass control to the single-threaded skeleton */
@@ -387,7 +389,7 @@ int     main(int argc, char **argv)
 {
     static CONFIG_INT_TABLE int_table[] = {
        VAR_VIRT_MINUID, DEF_VIRT_MINUID, &var_virt_minimum_uid, 1, 0,
-       VAR_VIRT_MAILBOX_LIMIT, DEF_VIRT_MAILBOX_LIMIT, &var_virt_mailbox_limit, 1, 0,
+       VAR_VIRT_MAILBOX_LIMIT, DEF_VIRT_MAILBOX_LIMIT, &var_virt_mailbox_limit, 0, 0,
        0,
     };
     static CONFIG_STR_TABLE str_table[] = {