]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.6-20080220
authorWietse Venema <wietse@porcupine.org>
Wed, 20 Feb 2008 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:33:57 +0000 (06:33 +0000)
12 files changed:
postfix/HISTORY
postfix/README_FILES/ADDRESS_REWRITING_README
postfix/README_FILES/DEBUG_README
postfix/html/ADDRESS_REWRITING_README.html
postfix/html/DEBUG_README.html
postfix/html/master.8.html
postfix/man/man8/master.8
postfix/proto/ADDRESS_REWRITING_README.html
postfix/proto/DEBUG_README.html
postfix/src/global/mail_version.h
postfix/src/master/Makefile.in
postfix/src/master/master.c

index 2f788287e52a59ec48dd2f2fbe5af299bdf8afd6..22b7bc5ce7448939fa27da79fda9a5deed083759 100644 (file)
@@ -14337,12 +14337,21 @@ Apologies for any names omitted.
 
 20080212
 
-       Feature: check_reverse_client_access, to make access decisions
-       based on the unverified client hostname.  For safety reasons
-       an OK result is not allowed.  Noel Jones. Files:
-       smtpd/smtpd_check.c plus header files and documentation.
+       Feature: check_reverse_client_hostname_access, to make
+       access decisions based on the unverified client hostname.
+       For safety reasons an OK result is not allowed.  Noel Jones.
+       Files: smtpd/smtpd_check.c plus header files and documentation.
 
 20080215
 
-       Safety: break SASL loop in case both the SASL library and the
-       remote SMTP server are confused. File: smtp/smtp_sasl_glue.c.
+       Safety: break SASL loop in case both the SASL library and
+       the remote SMTP server are confused. File: smtp/smtp_sasl_glue.c.
+
+20080220
+
+       Safety: the master daemon now sets an exclusive lock on a
+       file $data_directory/master.lock, so that the data directory
+       can't be shared between multiple Postfix instances.  This
+       would corrupt files that rely on single-writer updates
+       (examples: verify(8) cache, tlsmgr(8) caches, etc.). File:
+       master/master.c.
index b7e75ad5acd53534f758e1e9b3cb56bcd6cfca76..63786eb89752acce78db61779b1ce6529b370ff7 100644 (file)
@@ -752,11 +752,11 @@ Examples:
 
 D\bDe\beb\bbu\bug\bgg\bgi\bin\bng\bg y\byo\bou\bur\br a\bad\bdd\bdr\bre\bes\bss\bs m\bma\ban\bni\bip\bpu\bul\bla\bat\bti\bio\bon\bns\bs
 
-With Postfix version 2.1 and later you can ask Postfix to produce mail delivery
-reports for debugging purposes. These reports not only show sender/recipient
-addresses after address rewriting and alias expansion or forwarding, they also
-show information about delivery to mailbox, delivery to non-Postfix command,
-responses from remote SMTP servers, and so on.
+Postfix version 2.1 and later can produce mail delivery reports for debugging
+purposes. These reports not only show sender/recipient addresses after address
+rewriting and alias expansion or forwarding, they also show information about
+delivery to mailbox, delivery to non-Postfix command, responses from remote
+SMTP servers, and so on.
 
 Postfix can produce two types of mail delivery reports for debugging:
 
index fd447f8c20bcc7559f1820d5de117c1e8142ca52..6e041d733a08056dcd623821f3d28b62b2551458 100644 (file)
@@ -64,11 +64,11 @@ The nature of each problem is indicated as follows:
 
 D\bDe\beb\bbu\bug\bgg\bgi\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx f\bfr\bro\bom\bm i\bin\bns\bsi\bid\bde\be
 
-With Postfix version 2.1 and later you can ask Postfix to produce mail delivery
-reports for debugging purposes. These reports not only show sender/recipient
-addresses after address rewriting and alias expansion or forwarding, they also
-show information about delivery to mailbox, delivery to non-Postfix command,
-responses from remote SMTP servers, and so on.
+Postfix version 2.1 and later can produce mail delivery reports for debugging
+purposes. These reports not only show sender/recipient addresses after address
+rewriting and alias expansion or forwarding, they also show information about
+delivery to mailbox, delivery to non-Postfix command, responses from remote
+SMTP servers, and so on.
 
 Postfix can produce two types of mail delivery reports for debugging:
 
index f2243516d26d9b8a98115baa9ccb4627c96ec2af..609060dea9856fd22c94f1a0e89a4afc427ca443 100644 (file)
@@ -1125,7 +1125,7 @@ extension, is appended to "sysadmin". For example, mail for
 
 <h2> <a name="debugging"> Debugging your address manipulations </a> </h2>
 
-<p> With Postfix version 2.1 and later you can ask Postfix to
+<p> Postfix version 2.1 and later can
 produce mail delivery reports for debugging purposes. These reports
 not only show sender/recipient addresses after address rewriting
 and alias expansion or forwarding, they also show information about
index fd648c484348170a94cf70aae8459ecbc20df52d..48dea66873e1a145649f5aa1b66c50d518fff02e 100644 (file)
@@ -113,7 +113,7 @@ configuration errors that could become a problem later. </p>
 
 <h2><a name="trace_mail">Debugging Postfix from inside</a> </h2>
 
-<p> With Postfix version 2.1 and later you can ask Postfix to
+<p> Postfix version 2.1 and later can
 produce mail delivery reports for debugging purposes. These reports
 not only show sender/recipient addresses after address rewriting
 and alias expansion or forwarding, they also show information about
index 8594748053eb4a5c4e9f99679f182343ec281083..2d5242ec3dfb86c857bf18c0ecd1d00932aae8d8 100644 (file)
@@ -168,9 +168,13 @@ MASTER(8)                                                            MASTER(8)
               becomes, for example, "postfix/smtpd".
 
 <b>FILES</b>
-       /etc/postfix/<a href="postconf.5.html">main.cf</a>, global configuration file.
-       /etc/postfix/<a href="master.5.html">master.cf</a>, master server configuration file.
-       /var/spool/postfix/pid/master.pid, master lock file.
+       To expand the directory names below into their actual val-
+       ues, use the command "<b>postconf <a href="postconf.5.html#config_directory">config_directory</a></b>" etc.
+
+       $<a href="postconf.5.html#config_directory">config_directory</a>/<a href="postconf.5.html">main.cf</a>, global configuration file.
+       $<a href="postconf.5.html#config_directory">config_directory</a>/<a href="master.5.html">master.cf</a>, master server configuration file.
+       $<a href="postconf.5.html#queue_directory">queue_directory</a>/pid/master.pid, master lock file.
+       $<a href="postconf.5.html#data_directory">data_directory</a>/master.lock, master lock file.
 
 <b>SEE ALSO</b>
        <a href="qmgr.8.html">qmgr(8)</a>, queue manager
@@ -180,7 +184,7 @@ MASTER(8)                                                            MASTER(8)
        syslogd(8), system logging
 
 <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>
index bc20cda9d5b196a445c33aaae1fa976dccb63513..3c50f988978c4fb5d25eea8c4e0ab2489d79c5bb 100644 (file)
@@ -148,9 +148,17 @@ records, so that "smtpd" becomes, for example, "postfix/smtpd".
 .SH "FILES"
 .na
 .nf
-/etc/postfix/main.cf, global configuration file.
-/etc/postfix/master.cf, master server configuration file.
-/var/spool/postfix/pid/master.pid, master lock file.
+.ad
+.fi
+To expand the directory names below into their actual values,
+use the command "\fBpostconf config_directory\fR" etc.
+.na
+.nf
+
+$config_directory/main.cf, global configuration file.
+$config_directory/master.cf, master server configuration file.
+$queue_directory/pid/master.pid, master lock file.
+$data_directory/master.lock, master lock file.
 .SH "SEE ALSO"
 .na
 .nf
index 3fef9064348778cf5436b3b6bd5f117aab161049..94612cc16a717a0216776fef73b434e2b88b695c 100644 (file)
@@ -1125,7 +1125,7 @@ extension, is appended to "sysadmin". For example, mail for
 
 <h2> <a name="debugging"> Debugging your address manipulations </a> </h2>
 
-<p> With Postfix version 2.1 and later you can ask Postfix to
+<p> Postfix version 2.1 and later can
 produce mail delivery reports for debugging purposes. These reports
 not only show sender/recipient addresses after address rewriting
 and alias expansion or forwarding, they also show information about
index 2cb2972498ee4815ccc1986b5628f58cd0864829..180849597a07e5b69efe6bc3a9f3bc60bcbff6c1 100644 (file)
@@ -113,7 +113,7 @@ configuration errors that could become a problem later. </p>
 
 <h2><a name="trace_mail">Debugging Postfix from inside</a> </h2>
 
-<p> With Postfix version 2.1 and later you can ask Postfix to
+<p> Postfix version 2.1 and later can
 produce mail delivery reports for debugging purposes. These reports
 not only show sender/recipient addresses after address rewriting
 and alias expansion or forwarding, they also show information about
index a49411f2b0c696b43e73d0638dd4f30c6387a4c2..62cb2496a93b94fb76f23cdd4241d3b484217b0d 100644 (file)
@@ -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      "20080216"
+#define MAIL_RELEASE_DATE      "20080220"
 #define MAIL_VERSION_NUMBER    "2.6"
 
 #ifdef SNAPSHOT
index 15a54777758e96a6ff12eddc9afb84595da9ad9c..6ab775d478f5f087fa48cf1b7932cd2065d84b52 100644 (file)
@@ -105,6 +105,7 @@ master.o: ../../include/myflock.h
 master.o: ../../include/mymalloc.h
 master.o: ../../include/open_lock.h
 master.o: ../../include/safe.h
+master.o: ../../include/set_eugid.h
 master.o: ../../include/stringops.h
 master.o: ../../include/sys_defs.h
 master.o: ../../include/vbuf.h
index ed9f942771df7a5aa0505a469baf34b4138026fb..4452fbdd620c4d6ada5b0e5c5560684621c1ed88 100644 (file)
 /*     The mail system name that is prepended to the process name in syslog
 /*     records, so that "smtpd" becomes, for example, "postfix/smtpd".
 /* FILES
-/*     /etc/postfix/main.cf, global configuration file.
-/*     /etc/postfix/master.cf, master server configuration file.
-/*     /var/spool/postfix/pid/master.pid, master lock file.
+/* .ad
+/* .fi
+/*     To expand the directory names below into their actual values,
+/*     use the command "\fBpostconf config_directory\fR" etc.
+/* .na
+/* .nf
+/*
+/*     $config_directory/main.cf, global configuration file.
+/*     $config_directory/master.cf, master server configuration file.
+/*     $queue_directory/pid/master.pid, master lock file.
+/*     $data_directory/master.lock, master lock file.
 /* SEE ALSO
 /*     qmgr(8), queue manager
 /*     verify(8), address verification
 #include <clean_env.h>
 #include <argv.h>
 #include <safe.h>
+#include <set_eugid.h>
 
 /* Global library. */
 
@@ -216,7 +225,9 @@ MAIL_VERSION_STAMP_DECLARE;
 int     main(int argc, char **argv)
 {
     static VSTREAM *lock_fp;
+    static VSTREAM *data_lock_fp;
     VSTRING *lock_path;
+    VSTRING *data_lock_path;
     off_t   inherited_limit;
     int     debug_me = 0;
     int     ch;
@@ -390,6 +401,7 @@ int     main(int argc, char **argv)
      * isn't locked.
      */
     lock_path = vstring_alloc(10);
+    data_lock_path = vstring_alloc(10);
     why = vstring_alloc(10);
 
     vstring_sprintf(lock_path, "%s/%s.pid", DEF_PID_DIR, var_procname);
@@ -407,8 +419,29 @@ int     main(int argc, char **argv)
        msg_fatal("cannot update lock file %s: %m", vstring_str(lock_path));
     close_on_exec(vstream_fileno(lock_fp), CLOSE_ON_EXEC);
 
+    /*
+     * Lock down the Postfix-writable data directory.
+     */
+    vstring_sprintf(data_lock_path, "%s/%s.lock", var_data_dir, var_procname);
+    SAVE_AND_SET_EUGID(var_owner_uid, var_owner_gid);
+    data_lock_fp =
+       open_lock(vstring_str(data_lock_path), O_RDWR | O_CREAT, 0644, why);
+    RESTORE_SAVED_EUGID();
+    if (data_lock_fp == 0)
+       msg_fatal("open lock file %s: %s",
+                 vstring_str(data_lock_path), vstring_str(why));
+    vstream_fprintf(data_lock_fp, "%*lu\n", (int) sizeof(unsigned long) * 4,
+                   (unsigned long) var_pid);
+    if (vstream_fflush(data_lock_fp))
+       msg_fatal("cannot update lock file %s: %m", vstring_str(data_lock_path));
+    close_on_exec(vstream_fileno(data_lock_fp), CLOSE_ON_EXEC);
+
+    /*
+     * Clean up.
+     */
     vstring_free(why);
     vstring_free(lock_path);
+    vstring_free(data_lock_path);
 
     /*
      * Optionally start the debugger on ourself.
@@ -440,6 +473,9 @@ int     main(int argc, char **argv)
        if (myflock(vstream_fileno(lock_fp), INTERNAL_LOCK,
                    MYFLOCK_OP_EXCLUSIVE) < 0)
            msg_fatal("refresh exclusive lock: %m");
+       if (myflock(vstream_fileno(data_lock_fp), INTERNAL_LOCK,
+                   MYFLOCK_OP_EXCLUSIVE) < 0)
+           msg_fatal("refresh exclusive lock: %m");
 #endif
        watchdog_start(watchdog);               /* same as trigger servers */
        event_loop(-1);