mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-29 13:18:12 +00:00
snapshot-20020114
This commit is contained in:
parent
2e7d506175
commit
046bb3324d
@ -5953,8 +5953,17 @@ Apologies for any names omitted.
|
|||||||
|
|
||||||
Rewrote postfix-install. The postfix-files file now controls
|
Rewrote postfix-install. The postfix-files file now controls
|
||||||
what is installed. Refined the semantics of many post-install
|
what is installed. Refined the semantics of many post-install
|
||||||
operations. post-install now auto-saves settings that override
|
operations. post-install now auto-saves settings that
|
||||||
main.cf.
|
override main.cf.
|
||||||
|
|
||||||
|
20020114
|
||||||
|
|
||||||
|
Bugfix: alternate_config_directories did not take comma
|
||||||
|
or whitespace as separators. File: global/mail_conf.c.
|
||||||
|
Victor Duchovny, Norgan Stanley.
|
||||||
|
|
||||||
|
Bugfix: the rewritten postfix-install script did not chattr
|
||||||
|
+S the Postfix queue.
|
||||||
|
|
||||||
Open problems:
|
Open problems:
|
||||||
|
|
||||||
|
@ -183,6 +183,10 @@ again.
|
|||||||
6 - Installing the software after successful compilation
|
6 - Installing the software after successful compilation
|
||||||
========================================================
|
========================================================
|
||||||
|
|
||||||
|
This text describes how to install Postfix from source code. See
|
||||||
|
the PACKAGE_README file if you are building a package for distribution
|
||||||
|
to other systems.
|
||||||
|
|
||||||
IMPORTANT: if you are REPLACING an existing sendmail installation
|
IMPORTANT: if you are REPLACING an existing sendmail installation
|
||||||
with Postfix, you may need to keep the old sendmail program running
|
with Postfix, you may need to keep the old sendmail program running
|
||||||
for some time in order to flush the mail queue. As superuser,
|
for some time in order to flush the mail queue. As superuser,
|
||||||
|
@ -14,7 +14,7 @@ default: update
|
|||||||
update depend printfck clean tidy depend_update: Makefiles
|
update depend printfck clean tidy depend_update: Makefiles
|
||||||
$(MAKE) MAKELEVEL= $@
|
$(MAKE) MAKELEVEL= $@
|
||||||
|
|
||||||
install:
|
install upgrade:
|
||||||
@echo Please review the INSTALL instructions first.
|
@echo Please review the INSTALL instructions first.
|
||||||
|
|
||||||
makefiles Makefiles:
|
makefiles Makefiles:
|
||||||
|
@ -14,7 +14,7 @@ default: update
|
|||||||
update depend printfck clean tidy depend_update: Makefiles
|
update depend printfck clean tidy depend_update: Makefiles
|
||||||
$(MAKE) MAKELEVEL= $@
|
$(MAKE) MAKELEVEL= $@
|
||||||
|
|
||||||
install:
|
install upgrade:
|
||||||
@echo Please review the INSTALL instructions first.
|
@echo Please review the INSTALL instructions first.
|
||||||
|
|
||||||
makefiles Makefiles:
|
makefiles Makefiles:
|
||||||
|
@ -56,9 +56,9 @@ be lost when you update a table while Postfix is running.
|
|||||||
Building Postfix on Linux with a specific Berkeley DB version
|
Building Postfix on Linux with a specific Berkeley DB version
|
||||||
=============================================================
|
=============================================================
|
||||||
|
|
||||||
Some Linux systems systems ship with multiple Berkeley DB
|
Some Linux systems ship with multiple Berkeley DB implementations.
|
||||||
implementations. Normally, Postfix builds with the default DB
|
Normally, Postfix builds with the default DB version that ships
|
||||||
version that ships with the system.
|
with the system.
|
||||||
|
|
||||||
On Linux, you need to edit the makedefs script in order to specify
|
On Linux, you need to edit the makedefs script in order to specify
|
||||||
a non-default DB library.
|
a non-default DB library.
|
||||||
|
@ -167,7 +167,7 @@ parameter below, "server_host", would be defined in main.cf as
|
|||||||
postfix-users@postfix.org mailing list.
|
postfix-users@postfix.org mailing list.
|
||||||
|
|
||||||
debuglevel (0)
|
debuglevel (0)
|
||||||
What level to set for debugging in the the OpenLDAP libraries.
|
What level to set for debugging in the OpenLDAP libraries.
|
||||||
|
|
||||||
Don't use quotes in these variables; at least, not until the Postfix
|
Don't use quotes in these variables; at least, not until the Postfix
|
||||||
configuration routines understand how to deal with quoted strings.
|
configuration routines understand how to deal with quoted strings.
|
||||||
|
@ -245,8 +245,8 @@ are supported.
|
|||||||
|
|
||||||
With the above settings, the Postfix local delivery agent expands
|
With the above settings, the Postfix local delivery agent expands
|
||||||
aliases and .forward files, and delegates mailbox delivery to the
|
aliases and .forward files, and delegates mailbox delivery to the
|
||||||
the Cyrus LMTP server. Postfix makes a connection to port 24 on
|
Cyrus LMTP server. Postfix makes a connection to port 24 on the
|
||||||
the local host, subsequently transmitting the message to the lmtpd
|
local host, subsequently transmitting the message to the lmtpd
|
||||||
server managed by the Cyrus master process.
|
server managed by the Cyrus master process.
|
||||||
|
|
||||||
|
|
||||||
|
80
postfix/README_FILES/PACKAGE_README
Normal file
80
postfix/README_FILES/PACKAGE_README
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
Hints and tips for Postfix packagers
|
||||||
|
====================================
|
||||||
|
|
||||||
|
1) The installed main.cf file must be small. PLEASE resist the
|
||||||
|
temptation to list all 100 million Postfix parameters in the main.cf
|
||||||
|
file. Postfix is supposed to be easy to configure. Listing all
|
||||||
|
100 million parameters in main.cf defeats the purpose.
|
||||||
|
|
||||||
|
2) Please provide the sample-xxx files. If these files are not
|
||||||
|
installed in the same directory as main.cf, PLEASE update the notice
|
||||||
|
at the top of main.cf that advises the user of the existence of
|
||||||
|
the sample-xxx files. Without the sample-xxx files, Postfix will
|
||||||
|
be much more difficult to configure.
|
||||||
|
|
||||||
|
Building a package for distribution to other systems
|
||||||
|
====================================================
|
||||||
|
|
||||||
|
You can build a Postfix package on a machine that does not have
|
||||||
|
Postfix installed on it. All you need is Postfix source code and
|
||||||
|
a compilation environment that is compatible with the target system.
|
||||||
|
|
||||||
|
You can build a pre-built Postfix package as an unprivileged user,
|
||||||
|
but the result will be cleaner if you build the package as root.
|
||||||
|
|
||||||
|
After successful Postfix compilation, execute:
|
||||||
|
|
||||||
|
% sh postfix-install
|
||||||
|
|
||||||
|
You will be prompted for installation parameters. Specify an
|
||||||
|
install_root directory other than /. The mail_owner and setgid_group
|
||||||
|
installation parameter settings will be recorded in the main.cf
|
||||||
|
file, but they won't take effect until the package is unpacked and
|
||||||
|
installed on the destination machine.
|
||||||
|
|
||||||
|
If you want to fully automate the process, specify all the non-default
|
||||||
|
installation parameters on the command line:
|
||||||
|
|
||||||
|
% sh postfix-install -non-interactive install_root=/some/where ...
|
||||||
|
|
||||||
|
Begin Security Alert.
|
||||||
|
|
||||||
|
When building an archive for distribution, be sure to archive only
|
||||||
|
files and symbolic links, not their parent directories. Otherwise,
|
||||||
|
unpacking a pre-built Postfix package may mess up permission and/or
|
||||||
|
ownership of system directories such as / /etc /usr /usr/bin /var
|
||||||
|
/var/spool and so on. This is especially an issue if you executed
|
||||||
|
postfix-install (see above) as an unprivileged user.
|
||||||
|
|
||||||
|
End Security Alert.
|
||||||
|
|
||||||
|
Thus, instead of simply tarring up a pre-built tree it is much
|
||||||
|
safer if you jump the following hoops:
|
||||||
|
|
||||||
|
% cd /install/root
|
||||||
|
% rm -f /some/where/outputfile
|
||||||
|
% find . \! -type d -print | xargs tar rf /some/where/outputfile
|
||||||
|
% gzip /some/where/outputfile
|
||||||
|
|
||||||
|
Installing a pre-built Postfix package
|
||||||
|
======================================
|
||||||
|
|
||||||
|
To unpack a pre-built Postfix package, execute the equivalent of:
|
||||||
|
|
||||||
|
# umask 022
|
||||||
|
# gzip -d <outputfile.tar.gz | (cd / ; tar xvpf -)
|
||||||
|
|
||||||
|
The umask command is necessary for getting the correct permissions
|
||||||
|
on non-Postfix directories that need to be created in the process.
|
||||||
|
|
||||||
|
Create the necessary mail_owner account and setgid_group group for
|
||||||
|
exclusive use by Postfix.
|
||||||
|
|
||||||
|
Execute the post-install script in the Postfix configuration
|
||||||
|
directory to set ownership and permission of Postfix files and
|
||||||
|
directories. Specify any non-default settings for mail_owner or
|
||||||
|
setgid_group on the post-install command line:
|
||||||
|
|
||||||
|
# sh post-install upgrade-package setgid_group=xxx mail_owner=yyy
|
||||||
|
|
||||||
|
This will also update the main.cf and master.cf files if necessary.
|
@ -44,5 +44,5 @@ addresses (breaking down user@domain into user@, domain, user,
|
|||||||
canonical maps and virtual maps.
|
canonical maps and virtual maps.
|
||||||
|
|
||||||
An additional restriction is that regular expression tables cannot
|
An additional restriction is that regular expression tables cannot
|
||||||
cannot be used for local alias database lookups. That would be a
|
be used for local alias database lookups. That would be a security
|
||||||
security exposure anyway.
|
exposure anyway.
|
||||||
|
@ -327,12 +327,12 @@ $0: Error: some required installation parameters are not defined.
|
|||||||
- Either the parameters need to be given in the $config_directory/main.cf
|
- Either the parameters need to be given in the $config_directory/main.cf
|
||||||
file from a recent Postfix installation,
|
file from a recent Postfix installation,
|
||||||
|
|
||||||
- Or the parameters need to be specified as name=value arguments
|
|
||||||
on the $0 command line,
|
|
||||||
|
|
||||||
- Or the parameters need to be specified through the process
|
- Or the parameters need to be specified through the process
|
||||||
environment.
|
environment.
|
||||||
|
|
||||||
|
- Or the parameters need to be specified as name=value arguments
|
||||||
|
on the $0 command line,
|
||||||
|
|
||||||
The following parameters were missing:
|
The following parameters were missing:
|
||||||
|
|
||||||
$missing
|
$missing
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
# This parameter setting is not recorded in the installed main.cf file.
|
# This parameter setting is not recorded in the installed main.cf file.
|
||||||
# .IP tempdir
|
# .IP tempdir
|
||||||
# Directory for scratch files while installing Postfix.
|
# Directory for scratch files while installing Postfix.
|
||||||
# You must must have write permission in this directory.
|
# You must have write permission in this directory.
|
||||||
# The built-in default directory name is the current directory.
|
# The built-in default directory name is the current directory.
|
||||||
# This parameter setting is not recorded in the installed main.cf file.
|
# This parameter setting is not recorded in the installed main.cf file.
|
||||||
# .IP config_directory
|
# .IP config_directory
|
||||||
@ -184,6 +184,17 @@ test -x bin/postconf || {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# LINUX by default does not synchronously update directories -
|
||||||
|
# that's dangerous for mail.
|
||||||
|
#
|
||||||
|
if [ -f /usr/bin/chattr ]
|
||||||
|
then
|
||||||
|
CHATTR="/usr/bin/chattr +S"
|
||||||
|
else
|
||||||
|
CHATTR=echo
|
||||||
|
fi
|
||||||
|
|
||||||
case `uname -s` in
|
case `uname -s` in
|
||||||
HP-UX*) FMT=cat;;
|
HP-UX*) FMT=cat;;
|
||||||
*) FMT=fmt;;
|
*) FMT=fmt;;
|
||||||
@ -277,7 +288,7 @@ useful if you are building ready-to-install packages for distribution
|
|||||||
to other machines."
|
to other machines."
|
||||||
|
|
||||||
tempdir_prompt="a directory for scratch files while installing
|
tempdir_prompt="a directory for scratch files while installing
|
||||||
Postfix. You must must have write permission in this directory."
|
Postfix. You must have write permission in this directory."
|
||||||
|
|
||||||
config_directory_prompt="the destination directory for installed
|
config_directory_prompt="the destination directory for installed
|
||||||
Postfix configuration files."
|
Postfix configuration files."
|
||||||
@ -313,10 +324,10 @@ used by any other accounts on the system."
|
|||||||
setgid_group_prompt="the group for mail submission and for queue
|
setgid_group_prompt="the group for mail submission and for queue
|
||||||
management commands. Specify a group name with a numerical group
|
management commands. Specify a group name with a numerical group
|
||||||
ID that is not shared with other accounts, not even with the Postfix
|
ID that is not shared with other accounts, not even with the Postfix
|
||||||
mail_owner account."
|
mail_owner account. You can no longer specify \"no\" here."
|
||||||
|
|
||||||
manpage_path_prompt="the destination directory for the Postfix on-line
|
manpage_path_prompt="the destination directory for the Postfix on-line
|
||||||
manual pages."
|
manual pages. You can no longer specify \"no\" here."
|
||||||
|
|
||||||
# Default settings, just to get started.
|
# Default settings, just to get started.
|
||||||
|
|
||||||
@ -545,6 +556,7 @@ do
|
|||||||
test -z "$owner" || chown $owner $path || exit 1
|
test -z "$owner" || chown $owner $path || exit 1
|
||||||
test -z "$group" || chgrp $group $path || exit 1
|
test -z "$group" || chgrp $group $path || exit 1
|
||||||
chmod $mode $path || exit 1
|
chmod $mode $path || exit 1
|
||||||
|
$CHATTR $path >/dev/null 2>/dev/null
|
||||||
}
|
}
|
||||||
continue;;
|
continue;;
|
||||||
[fl]) ;;
|
[fl]) ;;
|
||||||
@ -582,29 +594,25 @@ do
|
|||||||
esac) || exit 1
|
esac) || exit 1
|
||||||
done
|
done
|
||||||
|
|
||||||
# If Postfix is being installed locally from source code, do the
|
# Save the installation parameters to main.cf even when they haven't
|
||||||
# post-install processing now. The post-install script will update
|
# changed from their current default. Defaults can change between
|
||||||
# main.cf with actual installaton parameter settings.
|
# Postfix releases, and software should not suddenly be installed in
|
||||||
#
|
# the wrong place when Postfix is being upgraded.
|
||||||
# If Postfix is being packaged for distribution to other systems,
|
|
||||||
# save the installation parameters to main.cf so they can be used
|
|
||||||
# as default settings when the post-install script is executed.
|
|
||||||
|
|
||||||
if [ -z "$install_root" ]
|
bin/postconf -c $CONFIG_DIRECTORY -e \
|
||||||
then
|
"daemon_directory = $daemon_directory" \
|
||||||
export daemon_directory command_directory queue_directory mail_owner \
|
"command_directory = $command_directory" \
|
||||||
setgid_group sendmail_path newaliases_path mailq_path manpage_path
|
"queue_directory = $queue_directory" \
|
||||||
|
"mail_owner = $mail_owner" \
|
||||||
|
"setgid_group = $setgid_group" \
|
||||||
|
"sendmail_path = $sendmail_path" \
|
||||||
|
"mailq_path = $mailq_path" \
|
||||||
|
"newaliases_path = $newaliases_path" \
|
||||||
|
"manpage_path = $manpage_path" \
|
||||||
|
|| exit 1
|
||||||
|
|
||||||
|
# If Postfix is being installed locally from source code, do the
|
||||||
|
# post-install processing now.
|
||||||
|
|
||||||
|
test -n "$install_root" ||
|
||||||
${SHELL} conf/post-install $post_install_options || exit 1
|
${SHELL} conf/post-install $post_install_options || exit 1
|
||||||
else
|
|
||||||
bin/postconf -c $CONFIG_DIRECTORY -e \
|
|
||||||
"daemon_directory = $daemon_directory" \
|
|
||||||
"command_directory = $command_directory" \
|
|
||||||
"queue_directory = $queue_directory" \
|
|
||||||
"mail_owner = $mail_owner" \
|
|
||||||
"setgid_group = $setgid_group" \
|
|
||||||
"sendmail_path = $sendmail_path" \
|
|
||||||
"mailq_path = $mailq_path" \
|
|
||||||
"newaliases_path = $newaliases_path" \
|
|
||||||
"manpage_path = $manpage_path" \
|
|
||||||
|| exit 1
|
|
||||||
fi
|
|
||||||
|
@ -118,7 +118,7 @@ static void mail_conf_checkdir(const char *config_dir)
|
|||||||
while (found == 0 && readlline(buf, fp, (int *) 0)) {
|
while (found == 0 && readlline(buf, fp, (int *) 0)) {
|
||||||
if (split_nameval(vstring_str(buf), &name, &value) == 0
|
if (split_nameval(vstring_str(buf), &name, &value) == 0
|
||||||
&& strcmp(name, VAR_CONFIG_DIRS) == 0) {
|
&& strcmp(name, VAR_CONFIG_DIRS) == 0) {
|
||||||
while (found == 0 && (cp = mystrtok(&value, "\t\r\n")) != 0)
|
while (found == 0 && (cp = mystrtok(&value, ", \t\r\n")) != 0)
|
||||||
if (strcmp(cp, config_dir) == 0)
|
if (strcmp(cp, config_dir) == 0)
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* Version of this program.
|
* Version of this program.
|
||||||
*/
|
*/
|
||||||
#define VAR_MAIL_VERSION "mail_version"
|
#define VAR_MAIL_VERSION "mail_version"
|
||||||
#define DEF_MAIL_VERSION "Snapshot-20020113"
|
#define DEF_MAIL_VERSION "Snapshot-20020114"
|
||||||
extern char *var_mail_version;
|
extern char *var_mail_version;
|
||||||
|
|
||||||
/* LICENSE
|
/* LICENSE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user