Mon, 20 Apr 2009 19:23:01 +0200
Add fingerprints config for client certificate based authentication.
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_FINGERP = fingerprints
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_FINGERP).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_FINGERP).db: $(T_FINGERP) $(MAKEFILE)
81 $(POSTMAP) hash:$(T_FINGERP)
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 #628 inet n - n - - qmqpd
107 pickup fifo n - n 60 1 pickup
108 cleanup unix n - n - 0 cleanup
109 qmgr fifo n - n 300 1 qmgr
110 tlsmgr unix - - n 1000? 1 tlsmgr
111 rewrite unix - - n - - trivial-rewrite
112 bounce unix - - n - 0 bounce
113 defer unix - - n - 0 bounce
114 trace unix - - n - 0 bounce
115 verify unix - - n - 1 verify
116 flush unix n - n 1000? 0 flush
117 proxymap unix - - n - - proxymap
118 proxywrite unix - - n - - proxymap
119 smtp unix - - n - - smtp
120 relay unix - - n - - smtp -o fallback_relay=
121 showq unix n - n - - showq
122 error unix - - n - - error
123 retry unix - - n - - error
124 local unix - n n - - local
125 virtual unix - n n - - virtual
126 lmtp unix - - n - - lmtp
127 anvil unix - - n - 1 anvil
128 scache unix - - n - 1 scache
129 #maildrop unix - n n - - pipe flags=DRhu user=@l_nusr@ argv=@l_prefix@/bin/maildrop -d ${recipient}
130 #cyrus unix - n n - - pipe user=@l_nusr@ argv=@l_prefix@/bin/cyrdeliver -e -r ${sender} -m ${extension} ${user}
131 #dovecot unix - n n - - pipe flags=DR user=opmi-r argv=/opmi/libexec/dovecot/deliver -f ${sender} -d ${user} -n -m ${extension}
132 #uucp unix - n n - - pipe flags=Fqhu user=@l_nusr@ argv=@l_prefix@/bin/uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
133 #ifmail unix - n n - - pipe flags=F user=@l_nusr@ argv=@l_prefix@/bin/ifmail -r $nexthop ($recipient)
134 #bsmtp unix - n n - - pipe flags=Fq. user=@l_nusr@ argv=@l_prefix@/bin/bsmtp -f $sender $nexthop $recipient
135 </file>
136 <file name="main.cf">
137 ##
138 ## @l_prefix@/etc/postfix/main.cf -- Postfix main configuration
139 ##
140 ## Run "@l_prefix@/sbin/postconf -n" to see all parameters overriding
141 ## defaults, run "@l_prefix@/sbin/postconf -d" to see all possible
142 ## parameters and their defaults and read the following manual
143 ## pages for description of each parameter: bounce(8), cleanup(8),
144 ## defer(8), error(8), flush(8), lmtp(8), local(8), master(8),
145 ## pickup(8), pipe(8), qmgr(8), showq(8), smtp(8), smtpd(8), spawn(8),
146 ## trivial-rewrite(8).
147 ##
149 # users
150 mail_owner = @l_musr@
151 setgid_group = @l_rgrp@
152 default_privs = @l_nusr@
154 # local host
155 myhostname = mail.example.com
156 mydomain = example.com
157 myorigin = $myhostname
159 # smtp daemon
160 #smtpd_banner = $myhostname ESMTP $mail_name
161 inet_interfaces = 127.0.0.1
163 # smtp client
164 smtp_bind_address = 127.0.0.1
166 # relaying
167 mynetworks = 127.0.0.0/8
168 #mydestination = $myhostname, localhost.$mydomain
169 #relay_domains = $mydestination,
170 # hash:@l_prefix@/etc/postfix/access
171 #smtpd_recipient_restrictions = permit_mynetworks,
172 # check_client_access hash:@l_prefix@/etc/postfix/access,
173 # reject_unauth_destination
175 # maps
176 #canonical_maps = hash:@l_prefix@/etc/postfix/canonical
177 #smtp_generic_maps = hash:@l_prefix@/etc/postfix/generic
178 #virtual_alias_maps = hash:@l_prefix@/etc/postfix/virtual
179 #relocated_maps = hash:@l_prefix@/etc/postfix/relocated
180 #transport_maps = hash:@l_prefix@/etc/postfix/transport
181 alias_maps = hash:@l_prefix@/etc/postfix/aliases
182 alias_database = hash:@l_prefix@/etc/postfix/aliases
184 # local delivery
185 #local_recipient_maps = proxy:unix:passwd.byname $alias_maps
186 recipient_delimiter = +
187 mailbox_command = @l_prefix@/bin/procmail -a "$EXTENSION"
189 </file>
190 <file name="access">
191 ##
192 ## @l_prefix@/etc/postfix/access -- access control for relaying
193 ##
194 ## Searched for both the client (hostname, parent domains, IP address,
195 ## networks obtained by stripping least significant octets from IP
196 ## address) and destination address (resolved destination address,
197 ## parent domain, or localpart@) in order to allow relaying. Rejects
198 ## the request if the result is REJECT or "[45]XX text". Permits the
199 ## request if the result is OK or RELAY or all-numerical.
200 ##
202 # Syntax (see access(5)):
203 # | user@domain action
204 # | domain action
205 # | user@ action
206 # | net.work.addr.ess action
207 # | net.work.addr action
208 # | net.work action
209 # | net action
210 # where "action" is one of:
211 # "[45]NN text", "REJECT", "OK", "restriction..."
212 #
213 # Examples:
214 # | mail.example.com OK
215 # | example.com REJECT
216 # | 192.168.0.1 OK
217 # | 192.168 REJECT
218 # | postmaster@ OK
220 </file>
221 <file name="virtual">
222 ##
223 ## @l_prefix@/etc/postfix/virtual -- virtual address translation
224 ##
225 ## Searched for virtual addresses user@domain, user and @domain
226 ## (in this order). It redirect mail for all recipients, local or
227 ## remote. The mapping affects only envelope recipients.
228 ##
230 # Syntax (see virtual(5)):
231 # | user@domain address, address, ...
232 # | user address, address, ...
233 # | @domain address, address, ...
234 #
235 # Examples:
236 # | @example.com john@example.com
237 # | postmaster@example.com postmaster
238 # | john@example1.com john1
239 # | john@example2.com john2
241 </file>
242 <file name="aliases">
243 ##
244 ## @l_prefix@/etc/postfix/aliases -- local mailbox aliases
245 ##
246 ## Searched for virtual addresses user@domain, user and @domain
247 ## (in this order). It redirect mail for all recipients, local or
248 ## remote. The mapping affects only envelope recipients.
249 ##
251 # Syntax (see aliases(5)):
252 # | name: value, value, ...
253 # where value is one of:
254 # "address", "/file/name", "|command", ":include:/file/name"
255 #
256 # Examples:
257 # | john.doe: john, doe
258 # | robot: |/path/to/robot
259 # | archive: /path/to/archive
260 # | users: :include:/path/to/users.list
261 # | owner-users: john.doe
263 # standard mail targets
264 nobody: /dev/null
265 MAILER-DAEMON: postmaster
267 # mailbox names for common services, roles and functions
268 # (see RFC2142 for more details and expanded list of names)
269 postmaster: root
270 hostmaster: root
271 security: root
272 abuse: root
274 # save unprivileged user storage of careless admins
275 root: /dev/null
277 </file>
278 <file name="canonical">
279 ##
280 ## @l_prefix@/etc/postfix/canonical -- address canonification on mail receiving
281 ##
282 ## Searched for canonical addresses for user@domain, user and @domain
283 ## (in this order).
284 ##
286 # Syntax (see canonical(5)):
287 # | user@domain address
288 # | user address
289 # | @domain address
290 #
291 # Examples:
292 # | postmaster@mail.example.com postmaster@example.com
293 # | john John.Doe
294 # | @example.com @example.com
296 </file>
297 <file name="relocated">
298 ##
299 ## @l_prefix@/etc/postfix/relocated -- relocate obsolete addresses
300 ##
301 ## Searched for relocated addresses user@domain, user and @domain
302 ## (in this order). It bounces mail for all recipients.
303 ##
305 # Syntax (see relocated(5)):
306 # | user@domain address
307 # | user address
308 # | @domain address
309 #
310 # Examples:
311 # | john@invalid john@example.com
312 # | john john@example.com
313 # | @invalid john@example.com
315 </file>
316 <file name="generic">
317 ##
318 ## @l_prefix@/etc/postfix/generic -- address canonification on mail sending
319 ##
320 ## Searched for canonical addresses for user@domain, user and @domain
321 ## (in this order).
322 ##
324 # Syntax (see generic(5)):
325 # | user@domain address
326 # | user address
327 # | @domain address
328 #
329 # Examples:
330 # | postmaster@mail.example.com postmaster@example.com
331 # | john John.Doe
332 # | @example.com @example.com
334 </file>
335 <file name="transport">
336 ##
337 ## @l_prefix@/etc/postfix/transport -- transport selection
338 ##
339 ## Searched for domain and .domain (in this order). It selects the
340 ## specified transport facility for delivery.
341 ##
343 # Syntax (see transport(5)):
344 # | domain transport:nexthop
345 # | .domain transport:nexthop
346 #
347 # Examples:
348 # | me.example.com local:
349 # | you.example.com smtp:mail.example.com:2525
350 # | example.com smtp:mail.example.com
351 # | .example.com smtp:mail.example.com
353 </file>
354 <file name="fingerprints">
355 ##
356 ## @l_prefix@/etc/postfix/fingerprints -- user identity verification
357 ##
358 ## Searched for user names matching TLS certificate fingerprints
359 ## when a client responding to the MTA's client certificate request
360 ## presents a valid (signed from proper CA) certificate.
361 ##
362 ## To find such fingerprints given a valid client certificate:
363 ## @l_prefix@/bin/openssl x509 -noout -fingerprint -sha1 -in certfile.pem
364 ##
366 # Examples:
367 # | B8:B8:A8:AE:B8:2A:2B:74:EC:43:FF:4F:B2:B2:AC:1E:B4:CE:26:1D
368 # | 18:81:F5:22:18:BA:EB:15:FF:40:30:00:EA:C0:B4:2E:EC:AE:86:8E
370 </file>