Mon, 28 Mar 2011 19:41:02 +0200
Completely rework package including...
Simpify 64-bit -fPIC logic, instruct make to build in parallel,
force error condition on failed profile dependency, build the
standard 'bootstrap' target as suggested, correct grammar, wording,
and punctuation in general, upgrade to latest upstream vendor version,
rearrange package dependencies mpc, mpfr, and gmp, correct buildconf
thanks to new lto-plugin forced, avoid failed platform specific stage
comparison, adjust patch code to reflect new version update, and most
importantly adjust optimization flags to platform. Please note that
block 'correct hardcoded paths' is likely no yet complete.
1 <file name="Makefile">
2 ##
3 ## @l_prefix@/etc/postfix/Makefile -- maintainance procedures
4 ##
6 # path configuration
7 PREFIX = @l_prefix@
8 SBINDIR = $(PREFIX)/sbin
9 ETCDIR = $(PREFIX)/etc
11 # program configuration
12 RC = $(ETCDIR)/rc
13 POSTALIAS = $(SBINDIR)/postalias
14 POSTMAP = $(SBINDIR)/postmap
15 POSTFIX = $(SBINDIR)/postfix
17 # table filename configuration
18 T_ACCESS = access
19 T_CANONICAL = canonical
20 T_GENERIC = generic
21 T_VIRTUAL = virtual
22 T_RELOCATED = relocated
23 T_TRANSPORT = transport
24 T_ALIASES = aliases
25 T_CLIENTS = clients
26 T_SENDERS = senders
27 T_CLICRT = clicrt
29 # dependency tracking
30 TIMESTAMP = .up-to-date
31 DEPENDENCIES = Makefile master.cf main.cf $(TABLES)
33 # managed tables:
34 # - use extension ".db" for hash tables ("hash")
35 # - use no extension for regex tables ("pcre")
36 TABLES = \
37 $(T_ACCESS).db \
38 $(T_CANONICAL).db \
39 $(T_GENERIC).db \
40 $(T_VIRTUAL).db \
41 $(T_RELOCATED).db \
42 $(T_TRANSPORT).db \
43 $(T_ALIASES).db \
44 $(T_CLIENTS).db \
45 $(T_SENDERS).db \
46 $(T_CLICRT).db
48 # default target
49 all: $(TABLES) $(TIMESTAMP)
51 # implicit checking and reloading
52 $(TIMESTAMP): $(DEPENDENCIES)
53 $(POSTFIX) check
54 $(POSTFIX) reload >/dev/null 2>&1 || true
55 touch $(TIMESTAMP) && chmod 600 $(TIMESTAMP)
57 # explicit checking
58 check:
59 $(POSTFIX) check
61 # hash table update targets
62 $(T_ACCESS).db: $(T_ACCESS) $(MAKEFILE)
63 $(POSTMAP) hash:$(T_ACCESS)
64 $(T_CANONICAL).db: $(T_CANONICAL) $(MAKEFILE)
65 $(POSTMAP) hash:$(T_CANONICAL)
66 $(T_GENERIC).db: $(T_GENERIC) $(MAKEFILE)
67 $(POSTMAP) hash:$(T_GENERIC)
68 $(T_VIRTUAL).db: $(T_VIRTUAL) $(MAKEFILE)
69 $(POSTMAP) hash:$(T_VIRTUAL)
70 $(T_RELOCATED).db: $(T_RELOCATED) $(MAKEFILE)
71 $(POSTMAP) hash:$(T_RELOCATED)
72 $(T_TRANSPORT).db: $(T_TRANSPORT) $(MAKEFILE)
73 $(POSTMAP) hash:$(T_TRANSPORT)
74 $(T_ALIASES).db: $(T_ALIASES) $(MAKEFILE)
75 $(POSTALIAS) hash:$(T_ALIASES)
76 $(T_CLIENTS).db: $(T_CLIENTS) $(MAKEFILE)
77 $(POSTMAP) hash:$(T_CLIENTS)
78 $(T_SENDERS).db: $(T_SENDERS) $(MAKEFILE)
79 $(POSTMAP) hash:$(T_SENDERS)
80 $(T_CLICRT).db: $(T_CLICRT) $(MAKEFILE)
81 $(POSTMAP) hash:$(T_CLICRT)
83 # cleanup target
84 clean:
85 -rm -f $(TABLES)
86 -rm -f $(TIMESTAMP)
88 # process management
89 start:
90 $(RC) postfix start
91 reload:
92 $(RC) postfix reload
93 stop:
94 $(RC) postfix stop
96 </file>
97 <file name="master.cf">
98 ##
99 ## @l_prefix@/etc/postfix/master.cf -- Postfix master process table
100 ##
101 # ==========================================================================
102 # service type private unpriv chroot wakeup maxproc command + args
103 # (yes) (yes) (yes) (never) (100)
104 # ==========================================================================
105 smtp inet n - n - - smtpd
106 #smtp inet n - n - - smtpd -o content_filter=spamass
107 #628 inet n - n - - qmqpd
108 pickup fifo n - n 60 1 pickup
109 cleanup unix n - n - 0 cleanup
110 qmgr fifo n - n 300 1 qmgr
111 tlsmgr unix - - n 1000? 1 tlsmgr
112 rewrite unix - - n - - trivial-rewrite
113 bounce unix - - n - 0 bounce
114 defer unix - - n - 0 bounce
115 trace unix - - n - 0 bounce
116 verify unix - - n - 1 verify
117 flush unix n - n 1000? 0 flush
118 proxymap unix - - n - - proxymap
119 proxywrite unix - - n - - proxymap
120 smtp unix - - n - - smtp
121 relay unix - - n - - smtp -o fallback_relay=
122 showq unix n - n - - showq
123 error unix - - n - - error
124 retry unix - - n - - error
125 local unix - n n - - local
126 virtual unix - n n - - virtual
127 lmtp unix - - n - - lmtp
128 anvil unix - - n - 1 anvil
129 scache unix - - n - 1 scache
130 #maildrop unix - n n - - pipe flags=DRhu user=@l_nusr@ argv=@l_prefix@/bin/maildrop -d ${recipient}
131 #cyrus unix - n n - - pipe user=@l_nusr@ argv=@l_prefix@/bin/cyrdeliver -e -r ${sender} -m ${extension} ${user}
132 #dovecot unix - n n - - pipe flags=DR user=@l_rusr@ argv=@l_prefix@/libexec/dovecot/deliver -f ${sender} -d ${user} -n -m ${extension}
133 #spamass unix - n n - - pipe flags=R user=@l_rusr@ argv=@l_prefix@/bin/spamc -f -u ${user} -e @l_prefix@/sbin/sendmail -oi -f ${sender} ${recipient}
134 #uucp unix - n n - - pipe flags=Fqhu user=@l_nusr@ argv=@l_prefix@/bin/uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
135 #ifmail unix - n n - - pipe flags=F user=@l_nusr@ argv=@l_prefix@/bin/ifmail -r $nexthop ($recipient)
136 #bsmtp unix - n n - - pipe flags=Fq. user=@l_nusr@ argv=@l_prefix@/bin/bsmtp -f $sender $nexthop $recipient
137 </file>
138 <file name="main.cf">
139 ##
140 ## @l_prefix@/etc/postfix/main.cf -- Postfix main configuration
141 ##
142 ## Run "@l_prefix@/sbin/postconf -n" to see all parameters overriding
143 ## defaults, run "@l_prefix@/sbin/postconf -d" to see all possible
144 ## parameters and their defaults and read the following manual
145 ## pages for description of each parameter: bounce(8), cleanup(8),
146 ## defer(8), error(8), flush(8), lmtp(8), local(8), master(8),
147 ## pickup(8), pipe(8), qmgr(8), showq(8), smtp(8), smtpd(8), spawn(8),
148 ## trivial-rewrite(8).
149 ##
151 # users
152 mail_owner = @l_musr@
153 setgid_group = @l_rgrp@
154 default_privs = @l_nusr@
156 # local host
157 myhostname = mail.example.com
158 mydomain = example.com
159 myorigin = $myhostname
161 # smtp daemon
162 #smtpd_banner = $myhostname ESMTP $mail_name
163 inet_interfaces = 127.0.0.1
165 # smtp client
166 smtp_bind_address = 127.0.0.1
168 # relaying
169 mynetworks = 127.0.0.0/8
170 #mydestination = $myhostname, localhost.$mydomain
171 #relay_domains = $mydestination,
172 # hash:@l_prefix@/etc/postfix/access
173 #relay_clientcerts = hash:@l_prefix@/etc//postfix/clicrt
174 #smtpd_recipient_restrictions = permit_mynetworks,
175 # check_client_access hash:@l_prefix@/etc/postfix/access,
176 # reject_unauth_destination
178 # maps
179 #canonical_maps = hash:@l_prefix@/etc/postfix/canonical
180 #smtp_generic_maps = hash:@l_prefix@/etc/postfix/generic
181 #virtual_alias_maps = hash:@l_prefix@/etc/postfix/virtual
182 #relocated_maps = hash:@l_prefix@/etc/postfix/relocated
183 #transport_maps = hash:@l_prefix@/etc/postfix/transport
184 alias_maps = hash:@l_prefix@/etc/postfix/aliases
185 alias_database = hash:@l_prefix@/etc/postfix/aliases
187 # local delivery
188 #local_recipient_maps = proxy:unix:passwd.byname $alias_maps
189 recipient_delimiter = +
190 mailbox_command = @l_prefix@/bin/procmail -a "$EXTENSION"
192 </file>
193 <file name="access">
194 ##
195 ## @l_prefix@/etc/postfix/access -- access control for relaying
196 ##
197 ## Searched for both the client (hostname, parent domains, IP address,
198 ## networks obtained by stripping least significant octets from IP
199 ## address) and destination address (resolved destination address,
200 ## parent domain, or localpart@) in order to allow relaying. Rejects
201 ## the request if the result is REJECT or "[45]XX text". Permits the
202 ## request if the result is OK or RELAY or all-numerical.
203 ##
205 # Syntax (see access(5)):
206 # | user@domain action
207 # | domain action
208 # | user@ action
209 # | net.work.addr.ess action
210 # | net.work.addr action
211 # | net.work action
212 # | net action
213 # where "action" is one of:
214 # "[45]NN text", "REJECT", "OK", "restriction..."
215 #
216 # Examples:
217 # | mail.example.com OK
218 # | example.com REJECT
219 # | 192.168.0.1 OK
220 # | 192.168 REJECT
221 # | postmaster@ OK
223 </file>
224 <file name="virtual">
225 ##
226 ## @l_prefix@/etc/postfix/virtual -- virtual address translation
227 ##
228 ## Searched for virtual addresses user@domain, user and @domain
229 ## (in this order). It redirect mail for all recipients, local or
230 ## remote. The mapping affects only envelope recipients.
231 ##
233 # Syntax (see virtual(5)):
234 # | user@domain address, address, ...
235 # | user address, address, ...
236 # | @domain address, address, ...
237 #
238 # Examples:
239 # | @example.com john@example.com
240 # | postmaster@example.com postmaster
241 # | john@example1.com john1
242 # | john@example2.com john2
244 </file>
245 <file name="aliases">
246 ##
247 ## @l_prefix@/etc/postfix/aliases -- local mailbox aliases
248 ##
249 ## Searched for virtual addresses user@domain, user and @domain
250 ## (in this order). It redirect mail for all recipients, local or
251 ## remote. The mapping affects only envelope recipients.
252 ##
254 # Syntax (see aliases(5)):
255 # | name: value, value, ...
256 # where value is one of:
257 # "address", "/file/name", "|command", ":include:/file/name"
258 #
259 # Examples:
260 # | john.doe: john, doe
261 # | robot: |/path/to/robot
262 # | archive: /path/to/archive
263 # | users: :include:/path/to/users.list
264 # | owner-users: john.doe
266 # standard mail targets
267 nobody: /dev/null
268 MAILER-DAEMON: postmaster
270 # mailbox names for common services, roles and functions
271 # (see RFC2142 for more details and expanded list of names)
272 postmaster: root
273 hostmaster: root
274 security: root
275 abuse: root
277 # save unprivileged user storage of careless admins
278 root: /dev/null
280 </file>
281 <file name="canonical">
282 ##
283 ## @l_prefix@/etc/postfix/canonical -- address canonification on mail receiving
284 ##
285 ## Searched for canonical addresses for user@domain, user and @domain
286 ## (in this order).
287 ##
289 # Syntax (see canonical(5)):
290 # | user@domain address
291 # | user address
292 # | @domain address
293 #
294 # Examples:
295 # | postmaster@mail.example.com postmaster@example.com
296 # | john John.Doe
297 # | @example.com @example.com
299 </file>
300 <file name="relocated">
301 ##
302 ## @l_prefix@/etc/postfix/relocated -- relocate obsolete addresses
303 ##
304 ## Searched for relocated addresses user@domain, user and @domain
305 ## (in this order). It bounces mail for all recipients.
306 ##
308 # Syntax (see relocated(5)):
309 # | user@domain address
310 # | user address
311 # | @domain address
312 #
313 # Examples:
314 # | john@invalid john@example.com
315 # | john john@example.com
316 # | @invalid john@example.com
318 </file>
319 <file name="generic">
320 ##
321 ## @l_prefix@/etc/postfix/generic -- address canonification on mail sending
322 ##
323 ## Searched for canonical addresses for user@domain, user and @domain
324 ## (in this order).
325 ##
327 # Syntax (see generic(5)):
328 # | user@domain address
329 # | user address
330 # | @domain address
331 #
332 # Examples:
333 # | postmaster@mail.example.com postmaster@example.com
334 # | john John.Doe
335 # | @example.com @example.com
337 </file>
338 <file name="transport">
339 ##
340 ## @l_prefix@/etc/postfix/transport -- transport selection
341 ##
342 ## Searched for domain and .domain (in this order). It selects the
343 ## specified transport facility for delivery.
344 ##
346 # Syntax (see transport(5)):
347 # | domain transport:nexthop
348 # | .domain transport:nexthop
349 #
350 # Examples:
351 # | me.example.com local:
352 # | you.example.com smtp:mail.example.com:2525
353 # | example.com smtp:mail.example.com
354 # | .example.com smtp:mail.example.com
356 </file>
357 <file name="clients">
358 ##
359 ## @l_prefix@/etc/postfix/clients -- control for relaying clients
360 ##
361 ## Searched for both the client (hostname, parent domains, IP address,
362 ## networks obtained by stripping least significant octets from IP
363 ## address) and destination address (resolved destination address,
364 ## parent domain, or localpart@) in order to allow relaying. Rejects
365 ## the request if the result is REJECT or "[45]XX text". Permits the
366 ## request if the result is OK or RELAY or all-numerical.
367 ##
369 # Syntax (see postmap(5)):
370 # | user@domain action
371 # | domain action
372 # | user@ action
373 # | net.work.addr.ess action
374 # | net.work.addr action
375 # | net.work action
376 # | net action
377 # where "action" is one of:
378 # "[45]NN text", "REJECT", "OK", "restriction..."
379 #
380 # Examples:
381 # | mail.example.com OK
382 # | example.com REJECT
383 # | 192.168.0.1 OK
384 # | 192.168 REJECT
385 # | postmaster@ OK
387 </file>
388 <file name="senders">
389 ##
390 ## @l_prefix@/etc/postfix/senders -- control for relaying senders
391 ##
392 ## Searched for both the client (hostname, parent domains, IP address,
393 ## networks obtained by stripping least significant octets from IP
394 ## address) and destination address (resolved destination address,
395 ## parent domain, or localpart@) in order to allow relaying. Rejects
396 ## the request if the result is REJECT or "[45]XX text". Permits the
397 ## request if the result is OK or RELAY or all-numerical.
398 ##
400 # Syntax (see access(5)):
401 # | user@domain action
402 # | domain action
403 # | user@ action
404 # | net.work.addr.ess action
405 # | net.work.addr action
406 # | net.work action
407 # | net action
408 # where "action" is one of:
409 # "[45]NN text", "REJECT", "OK", "restriction..."
410 #
411 # Examples:
412 # | mail.example.com OK
413 # | example.com REJECT
414 # | 192.168.0.1 OK
415 # | 192.168 REJECT
416 # | postmaster@ OK
418 </file>
419 <file name="clicrt">
420 ##
421 ## @l_prefix@/etc/postfix/clicrt -- user identity verification
422 ##
423 ## Searched for user names matching TLS certificate fingerprints
424 ## when a client responding to the MTA's client certificate request
425 ## presents a valid (signed from proper CA) certificate.
426 ##
427 ## To find such fingerprints given a valid client certificate:
428 ## @l_prefix@/bin/openssl x509 -noout -fingerprint -sha1 -in certfile.pem
429 ##
431 # Syntax (fingerprint according to smtpd_tls_fingerprint_digest):
432 # | fingerprint arbitrary-value
433 #
434 # Examples:
435 # | B8:B8:A8:AE:B8:2A:2B:74:EC:43:FF:4F:B2:B2:AC:1E:B4:CE:26:1D user1
436 # | 18:81:F5:22:18:BA:EB:15:FF:40:30:00:EA:C0:B4:2E:EC:AE:86:8E user2
438 </file>