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