1
GGuuiiddeelliinneess ffoorr PPaacckkaaggee BBuuiillddeerrss
3
-------------------------------------------------------------------------------
5
PPuurrppoossee ooff tthhiiss ddooccuummeenntt
7
This document has hints and tips for those who manage their own Postfix
8
distribution for internal use, and for those who maintain Postfix distributions
11
GGeenneerraall ddiissttrriibbuuttiioonnss:: pplleeaassee pprroovviiddee aa ssmmaallll ddeeffaauulltt mmaaiinn..ccff ffiillee
13
The installed main.cf file must be small. PLEASE resist the temptation to list
14
all 300+ parameters in the main.cf file. Postfix is supposed to be easy to
15
configure. Listing all 300+ in main.cf defeats the purpose. It is an invitation
16
for hobbyists to make random changes without understanding what they do, and
17
gets them into endless trouble.
19
GGeenneerraall ddiissttrriibbuuttiioonnss:: pplleeaassee iinncclluuddee RREEAADDMMEE oorr HHTTMMLL ffiilleess
21
Please provide the applicable README or HTML files. They are referenced by the
22
Postfix manual pages and by other files. Without README or HTML files, Postfix
23
will be difficult if not impossible to configure.
25
PPoossttffiixx IInnssttaallllaattiioonn ppaarraammeetteerrss
27
Postfix installation is controlled by a dozen installation parameters. See the
28
postfix-install and post-install files for details. Most parameters have
29
system-dependent default settings that are configurable at compile time, as
30
described in the INSTALL file.
32
PPrreeppaarriinngg aa pprree--bbuuiilltt ppaacckkaaggee ffoorr ddiissttrriibbuuttiioonn ttoo ootthheerr ssyysstteemmss
34
You can build a Postfix package on a machine that does not have Postfix
35
installed on it. All you need is Postfix source code and a compilation
36
environment that is compatible with the target system.
38
You can build a pre-built Postfix package as an unprivileged user.
40
First compile Postfix. After successful compilation, execute:
44
You will be prompted for installation parameters. Specify an install_root
45
directory other than /. The mail_owner and setgid_group installation parameter
46
settings will be recorded in the main.cf file, but they won't take effect until
47
the package is unpacked and installed on the destination machine.
49
If you want to fully automate this process, specify all the non-default
50
installation parameters on the command line:
52
% sh postfix-install -non-interactive
53
install_root=/some/where ...
55
BBeeggiinn SSeeccuurriittyy AAlleerrtt
57
WWhheenn bbuuiillddiinngg aann aarrcchhiivvee ffoorr ddiissttrriibbuuttiioonn,, bbee ssuurree ttoo aarrcchhiivvee oonnllyy ffiilleess aanndd
58
ssyymmbboolliicc lliinnkkss,, nnoott tthheeiirr ppaarreenntt ddiirreeccttoorriieess.. OOtthheerrwwiissee,, uunnppaacckkiinngg aa pprree--bbuuiilltt
59
PPoossttffiixx ppaacckkaaggee mmaayy mmeessss uupp ppeerrmmiissssiioonn aanndd//oorr oowwnneerrsshhiipp ooff ssyysstteemm ddiirreeccttoorriieess
60
ssuucchh aass // //eettcc //uussrr //uussrr//bbiinn //vvaarr //vvaarr//ssppooooll aanndd ssoo oonn.. TThhiiss iiss eessppeecciiaallllyy aann
61
iissssuuee iiff yyoouu eexxeeccuutteedd ppoossttffiixx--iinnssttaallll ((sseeee aabboovvee)) aass aann uunnpprriivviilleeggeedd uusseerr..
63
EEnndd SSeeccuurriittyy AAlleerrtt
65
Thus, to tar up the pre-built package, take the following steps:
68
% rm -f SOMEWHERE/outputfile
69
% find . \! -type d -print | xargs tar cf SOMEWHERE/outputfile
70
% gzip SOMEWHERE/outputfile
72
This way you will not include any directories that might cause trouble upon
75
IInnssttaalllliinngg aa pprree--bbuuiilltt PPoossttffiixx ppaacckkaaggee
77
* To unpack a pre-built Postfix package, execute the equivalent of:
80
# gzip -d <outputfile.tar.gz | (cd / ; tar xvpf -)
82
The umask command is necessary for getting the correct permissions on non-
83
Postfix directories that need to be created in the process.
85
* Create the necessary mail_owner account and setgid_group group for
86
exclusive use by Postfix.
88
* Execute the postfix command to set ownership and permission of Postfix
89
files and directories, and to update Postfix configuration files. If
90
necessary, specify any non-default settings for mail_owner or setgid_group
91
on the postfix command line:
93
# postfix set-permissions upgrade-configuration \
94
setgid_group=xxx mail_owner=yyy
96
With Postfix versions before 2.1 you achieve the same result by invoking
97
the post-install script directly.