2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-09-01 14:45:32 +00:00

postfix-2.6-20080220

This commit is contained in:
Wietse Venema
2008-02-20 00:00:00 -05:00
committed by Viktor Dukhovni
parent b11f47cada
commit c02aec2a68
12 changed files with 89 additions and 31 deletions

View File

@@ -14337,12 +14337,21 @@ Apologies for any names omitted.
20080212 20080212
Feature: check_reverse_client_access, to make access decisions Feature: check_reverse_client_hostname_access, to make
based on the unverified client hostname. For safety reasons access decisions based on the unverified client hostname.
an OK result is not allowed. Noel Jones. Files: For safety reasons an OK result is not allowed. Noel Jones.
smtpd/smtpd_check.c plus header files and documentation. Files: smtpd/smtpd_check.c plus header files and documentation.
20080215 20080215
Safety: break SASL loop in case both the SASL library and the Safety: break SASL loop in case both the SASL library and
remote SMTP server are confused. File: smtp/smtp_sasl_glue.c. 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.

View File

@@ -752,11 +752,11 @@ Examples:
DDeebbuuggggiinngg yyoouurr aaddddrreessss mmaanniippuullaattiioonnss DDeebbuuggggiinngg yyoouurr aaddddrreessss mmaanniippuullaattiioonnss
With Postfix version 2.1 and later you can ask Postfix to produce mail delivery Postfix version 2.1 and later can produce mail delivery reports for debugging
reports for debugging purposes. These reports not only show sender/recipient purposes. These reports not only show sender/recipient addresses after address
addresses after address rewriting and alias expansion or forwarding, they also rewriting and alias expansion or forwarding, they also show information about
show information about delivery to mailbox, delivery to non-Postfix command, delivery to mailbox, delivery to non-Postfix command, responses from remote
responses from remote SMTP servers, and so on. SMTP servers, and so on.
Postfix can produce two types of mail delivery reports for debugging: Postfix can produce two types of mail delivery reports for debugging:

View File

@@ -64,11 +64,11 @@ The nature of each problem is indicated as follows:
DDeebbuuggggiinngg PPoossttffiixx ffrroomm iinnssiiddee DDeebbuuggggiinngg PPoossttffiixx ffrroomm iinnssiiddee
With Postfix version 2.1 and later you can ask Postfix to produce mail delivery Postfix version 2.1 and later can produce mail delivery reports for debugging
reports for debugging purposes. These reports not only show sender/recipient purposes. These reports not only show sender/recipient addresses after address
addresses after address rewriting and alias expansion or forwarding, they also rewriting and alias expansion or forwarding, they also show information about
show information about delivery to mailbox, delivery to non-Postfix command, delivery to mailbox, delivery to non-Postfix command, responses from remote
responses from remote SMTP servers, and so on. SMTP servers, and so on.
Postfix can produce two types of mail delivery reports for debugging: Postfix can produce two types of mail delivery reports for debugging:

View File

@@ -1125,7 +1125,7 @@ extension, is appended to "sysadmin". For example, mail for
<h2> <a name="debugging"> Debugging your address manipulations </a> </h2> <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 produce mail delivery reports for debugging purposes. These reports
not only show sender/recipient addresses after address rewriting not only show sender/recipient addresses after address rewriting
and alias expansion or forwarding, they also show information about and alias expansion or forwarding, they also show information about

View 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> <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 produce mail delivery reports for debugging purposes. These reports
not only show sender/recipient addresses after address rewriting not only show sender/recipient addresses after address rewriting
and alias expansion or forwarding, they also show information about and alias expansion or forwarding, they also show information about

View File

@@ -168,9 +168,13 @@ MASTER(8) MASTER(8)
becomes, for example, "postfix/smtpd". becomes, for example, "postfix/smtpd".
<b>FILES</b> <b>FILES</b>
/etc/postfix/<a href="postconf.5.html">main.cf</a>, global configuration file. To expand the directory names below into their actual val-
/etc/postfix/<a href="master.5.html">master.cf</a>, master server configuration file. ues, use the command "<b>postconf <a href="postconf.5.html#config_directory">config_directory</a></b>" etc.
/var/spool/postfix/pid/master.pid, master lock file.
$<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> <b>SEE ALSO</b>
<a href="qmgr.8.html">qmgr(8)</a>, queue manager <a href="qmgr.8.html">qmgr(8)</a>, queue manager

View File

@@ -148,9 +148,17 @@ records, so that "smtpd" becomes, for example, "postfix/smtpd".
.SH "FILES" .SH "FILES"
.na .na
.nf .nf
/etc/postfix/main.cf, global configuration file. .ad
/etc/postfix/master.cf, master server configuration file. .fi
/var/spool/postfix/pid/master.pid, master lock file. 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" .SH "SEE ALSO"
.na .na
.nf .nf

View File

@@ -1125,7 +1125,7 @@ extension, is appended to "sysadmin". For example, mail for
<h2> <a name="debugging"> Debugging your address manipulations </a> </h2> <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 produce mail delivery reports for debugging purposes. These reports
not only show sender/recipient addresses after address rewriting not only show sender/recipient addresses after address rewriting
and alias expansion or forwarding, they also show information about and alias expansion or forwarding, they also show information about

View 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> <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 produce mail delivery reports for debugging purposes. These reports
not only show sender/recipient addresses after address rewriting not only show sender/recipient addresses after address rewriting
and alias expansion or forwarding, they also show information about and alias expansion or forwarding, they also show information about

View File

@@ -20,7 +20,7 @@
* Patches change both the patchlevel and the release date. Snapshots have no * Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only. * patchlevel; they change the release date only.
*/ */
#define MAIL_RELEASE_DATE "20080216" #define MAIL_RELEASE_DATE "20080220"
#define MAIL_VERSION_NUMBER "2.6" #define MAIL_VERSION_NUMBER "2.6"
#ifdef SNAPSHOT #ifdef SNAPSHOT

View File

@@ -105,6 +105,7 @@ master.o: ../../include/myflock.h
master.o: ../../include/mymalloc.h master.o: ../../include/mymalloc.h
master.o: ../../include/open_lock.h master.o: ../../include/open_lock.h
master.o: ../../include/safe.h master.o: ../../include/safe.h
master.o: ../../include/set_eugid.h
master.o: ../../include/stringops.h master.o: ../../include/stringops.h
master.o: ../../include/sys_defs.h master.o: ../../include/sys_defs.h
master.o: ../../include/vbuf.h master.o: ../../include/vbuf.h

View File

@@ -130,9 +130,17 @@
/* The mail system name that is prepended to the process name in syslog /* The mail system name that is prepended to the process name in syslog
/* records, so that "smtpd" becomes, for example, "postfix/smtpd". /* records, so that "smtpd" becomes, for example, "postfix/smtpd".
/* FILES /* FILES
/* /etc/postfix/main.cf, global configuration file. /* .ad
/* /etc/postfix/master.cf, master server configuration file. /* .fi
/* /var/spool/postfix/pid/master.pid, master lock file. /* 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 /* SEE ALSO
/* qmgr(8), queue manager /* qmgr(8), queue manager
/* verify(8), address verification /* verify(8), address verification
@@ -177,6 +185,7 @@
#include <clean_env.h> #include <clean_env.h>
#include <argv.h> #include <argv.h>
#include <safe.h> #include <safe.h>
#include <set_eugid.h>
/* Global library. */ /* Global library. */
@@ -216,7 +225,9 @@ MAIL_VERSION_STAMP_DECLARE;
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
static VSTREAM *lock_fp; static VSTREAM *lock_fp;
static VSTREAM *data_lock_fp;
VSTRING *lock_path; VSTRING *lock_path;
VSTRING *data_lock_path;
off_t inherited_limit; off_t inherited_limit;
int debug_me = 0; int debug_me = 0;
int ch; int ch;
@@ -390,6 +401,7 @@ int main(int argc, char **argv)
* isn't locked. * isn't locked.
*/ */
lock_path = vstring_alloc(10); lock_path = vstring_alloc(10);
data_lock_path = vstring_alloc(10);
why = vstring_alloc(10); why = vstring_alloc(10);
vstring_sprintf(lock_path, "%s/%s.pid", DEF_PID_DIR, var_procname); 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)); msg_fatal("cannot update lock file %s: %m", vstring_str(lock_path));
close_on_exec(vstream_fileno(lock_fp), CLOSE_ON_EXEC); 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(why);
vstring_free(lock_path); vstring_free(lock_path);
vstring_free(data_lock_path);
/* /*
* Optionally start the debugger on ourself. * Optionally start the debugger on ourself.
@@ -440,6 +473,9 @@ int main(int argc, char **argv)
if (myflock(vstream_fileno(lock_fp), INTERNAL_LOCK, if (myflock(vstream_fileno(lock_fp), INTERNAL_LOCK,
MYFLOCK_OP_EXCLUSIVE) < 0) MYFLOCK_OP_EXCLUSIVE) < 0)
msg_fatal("refresh exclusive lock: %m"); 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 #endif
watchdog_start(watchdog); /* same as trigger servers */ watchdog_start(watchdog); /* same as trigger servers */
event_loop(-1); event_loop(-1);