autoupdate
[postfix-master.git] / postfix-master / PACKAGE_README.html
blob9eec205a730a3b2eb69f20b1fd223c9529a37e40
1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <html>
6 <head>
8 <title>Guidelines for Package Builders</title>
10 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
12 </head>
14 <body>
16 <h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Guidelines for Package Builders</h1>
18 <hr>
20 <h2>Purpose of this document</h2>
22 <p> This document has hints and tips for those who manage their
23 own Postfix distribution for internal use, and for those who maintain
24 Postfix distributions for general use. </p>
26 <h2>General distributions: please provide a small default main.cf
27 file</h2>
29 <p> The installed <a href="postconf.5.html">main.cf</a> file must be small. PLEASE resist the
30 temptation to list all parameters in the <a href="postconf.5.html">main.cf</a> file. Postfix
31 is supposed to be easy to configure. Listing all parameters in <a href="postconf.5.html">main.cf</a>
32 defeats the purpose. It is an invitation for hobbyists to make
33 random changes without understanding what they do, and gets them
34 into endless trouble. </p>
36 <h2>General distributions: please include README or HTML files</h2>
38 <p> Please provide the applicable README or HTML files. They are
39 referenced by the Postfix manual pages and by other files. Without
40 README or HTML files, Postfix will be difficult if not impossible
41 to configure. </p>
43 <h2>Postfix Installation parameters</h2>
45 <p> Postfix installation is controlled by a dozen installation
46 parameters. See the postfix-install and post-install files for
47 details. Most parameters have system-dependent default settings
48 that are configurable at compile time, as described in the <a href="INSTALL.html">INSTALL</a>
49 file. </p>
51 <h2>Preparing a pre-built package for distribution to other
52 systems</h2>
54 <p> You can build a Postfix package on a machine that does not have
55 Postfix installed on it. All you need is Postfix source code and
56 a compilation environment that is compatible with the target system.
57 </p>
59 <p> You can build a pre-built Postfix package as an unprivileged
60 user. </p>
62 <p> First compile Postfix. After successful compilation, execute:
63 </p>
65 <blockquote> <pre> % <b>make package</b> </pre>
66 </blockquote>
68 <p> With Postfix versions before 2.2 you must invoke the post-install
69 script directly (<tt>% <b>sh post-install</b></tt>). </p>
71 <p> You will be prompted for installation parameters. Specify an
72 install_root directory other than /. The <a href="postconf.5.html#mail_owner">mail_owner</a> and <a href="postconf.5.html#setgid_group">setgid_group</a>
73 installation parameter settings will be recorded in the <a href="postconf.5.html">main.cf</a>
74 file, but they won't take effect until the package is unpacked and
75 installed on the destination machine. </p>
77 <p> If you want to fully automate this process, specify all the
78 non-default installation parameters on the command line: </p>
80 <blockquote>
81 <pre> % <b>make non-interactive-package install_root=/some/where</b>...
82 </pre> </blockquote>
84 <p> With Postfix versions before 2.2 you must invoke the post-install
85 script directly (<tt>% <b>sh post-install -non-interactive
86 install_root...</b></tt>). </p>
88 <h2>Begin Security Alert</h2>
90 <p> <b> When building an archive for distribution, be sure to
91 archive only files and symbolic links, not their parent directories.
92 Otherwise, unpacking a pre-built Postfix package may mess up
93 permission and/or ownership of system directories such as / /etc
94 /usr /usr/bin /var /var/spool and so on. This is especially an
95 issue if you executed postfix-install (see above) as an unprivileged
96 user. </b> </p>
98 <h2>End Security Alert</h2>
100 <p> Thus, to tar up the pre-built package, take the following steps:
101 </p>
103 <blockquote> <pre>
104 % cd INSTALL_ROOT
105 % rm -f SOMEWHERE/outputfile
106 % find . \! -type d -print | xargs tar rf SOMEWHERE/outputfile
107 % gzip SOMEWHERE/outputfile </pre> </blockquote>
109 <p>This way you will not include any directories that might cause
110 trouble upon extraction. </p>
112 <h2>Installing a pre-built Postfix package</h2>
114 <ul>
116 <li> <p> To unpack a pre-built Postfix package, execute the equivalent
117 of: </p>
119 <pre>
120 # umask 022
121 # gzip -d &lt;outputfile.tar.gz | (cd / ; tar xvpf -) </pre>
123 <p> The umask command is necessary for getting the correct permissions
124 on non-Postfix directories that need to be created in the process.
125 </p>
127 <li> <p> Create the necessary <a href="postconf.5.html#mail_owner">mail_owner</a> account and <a href="postconf.5.html#setgid_group">setgid_group</a>
128 group for exclusive use by Postfix. </p>
130 <li> <p> Execute the postfix command to set ownership and permission
131 of Postfix files and directories, and to update Postfix configuration
132 files. If necessary, specify any non-default settings for <a href="postconf.5.html#mail_owner">mail_owner</a>
133 or <a href="postconf.5.html#setgid_group">setgid_group</a> on the postfix command line: </p>
135 <pre>
136 # postfix set-permissions upgrade-configuration \
137 <a href="postconf.5.html#setgid_group">setgid_group</a>=xxx <a href="postconf.5.html#mail_owner">mail_owner</a>=yyy
138 </pre>
140 <p> With Postfix versions before 2.1 you achieve the same result
141 by invoking the post-install script directly. </p>
143 </ul>
145 </body>
147 </html>