1POSTFIX(1) General Commands Manual POSTFIX(1)
2
3
4
6 postfix - Postfix control program
7
9 postfix [-Dv] [-c config_dir] command
10
12 This command is reserved for the superuser. To submit mail, use the
13 Postfix sendmail(1) command.
14
15 The postfix(1) command controls the operation of the Postfix mail sys‐
16 tem: start or stop the master(8) daemon, do a health check, and other
17 maintenance.
18
19 By default, the postfix(1) command sets up a standardized environment
20 and runs the postfix-script shell script to do the actual work.
21
22 However, when support for multiple Postfix instances is configured,
23 postfix(1) executes the command specified with the multi_instance_wrap‐
24 per configuration parameter. This command will execute the command for
25 each applicable Postfix instance.
26
27 The following commands are implemented:
28
29 check Warn about bad directory/file ownership or permissions, and cre‐
30 ate missing directories.
31
32 start Start the Postfix mail system. This also runs the configuration
33 check described above.
34
35 stop Stop the Postfix mail system in an orderly fashion. If possible,
36 running processes are allowed to terminate at their earliest
37 convenience.
38
39 Note: in order to refresh the Postfix mail system after a con‐
40 figuration change, do not use the start and stop commands in
41 succession. Use the reload command instead.
42
43 abort Stop the Postfix mail system abruptly. Running processes are
44 signaled to stop immediately.
45
46 flush Force delivery: attempt to deliver every message in the deferred
47 mail queue. Normally, attempts to deliver delayed mail happen at
48 regular intervals, the interval doubling after each failed
49 attempt.
50
51 Warning: flushing undeliverable mail frequently will result in
52 poor delivery performance of all other mail.
53
54 reload Re-read configuration files. Running processes terminate at
55 their earliest convenience.
56
57 status Indicate if the Postfix mail system is currently running.
58
59 set-permissions [name=value ...]
60 Set the ownership and permissions of Postfix related files and
61 directories, as specified in the postfix-files file.
62
63 Specify name=value to override and update specific main.cf con‐
64 figuration parameters. Use this, for example, to change the
65 mail_owner or setgid_group setting for an already installed
66 Postfix system.
67
68 This feature is available in Postfix 2.1 and later. With Post‐
69 fix 2.0 and earlier, use "$config_directory/post-install set-
70 permissions".
71
72 upgrade-configuration [name=value ...]
73 Update the main.cf and master.cf files with information that
74 Postfix needs in order to run: add or update services, and add
75 or update configuration parameter settings.
76
77 Specify name=value to override and update specific main.cf con‐
78 figuration parameters.
79
80 This feature is available in Postfix 2.1 and later. With Post‐
81 fix 2.0 and earlier, use "$config_directory/post-install
82 upgrade-configuration".
83
84 The following options are implemented:
85
86 -c config_dir
87 Read the main.cf and master.cf configuration files in the named
88 directory instead of the default configuration directory. Use
89 this to distinguish between multiple Postfix instances on the
90 same host.
91
92 With Postfix 2.6 and later, this option forces the postfix(1)
93 command to operate on the specified Postfix instance only. This
94 behavior is inherited by postfix(1) commands that run as a
95 descendant of the current process.
96
97 -D (with postfix start only)
98 Run each Postfix daemon under control of a debugger as specified
99 via the debugger_command configuration parameter.
100
101 -v Enable verbose logging for debugging purposes. Multiple -v
102 options make the software increasingly verbose.
103
105 The postfix(1) command exports the following environment variables
106 before executing the postfix-script file:
107
108 MAIL_CONFIG
109 This is set when the -c command-line option is present.
110
111 With Postfix 2.6 and later, this environment variable forces the
112 postfix(1) command to operate on the specified Postfix instance
113 only. This behavior is inherited by postfix(1) commands that
114 run as a descendant of the current process.
115
116 MAIL_VERBOSE
117 This is set when the -v command-line option is present.
118
119 MAIL_DEBUG
120 This is set when the -D command-line option is present.
121
123 The following main.cf configuration parameters are exported as environ‐
124 ment variables with the same names:
125
126 command_directory (see 'postconf -d' output)
127 The location of all postfix administrative commands.
128
129 daemon_directory (see 'postconf -d' output)
130 The directory with Postfix support programs and daemon programs.
131
132 config_directory (see 'postconf -d' output)
133 The default location of the Postfix main.cf and master.cf con‐
134 figuration files.
135
136 queue_directory (see 'postconf -d' output)
137 The location of the Postfix top-level queue directory.
138
139 mail_owner (postfix)
140 The UNIX system account that owns the Postfix queue and most
141 Postfix daemon processes.
142
143 setgid_group (postdrop)
144 The group ownership of set-gid Postfix commands and of group-
145 writable Postfix directories.
146
147 sendmail_path (see 'postconf -d' output)
148 A Sendmail compatibility feature that specifies the location of
149 the Postfix sendmail(1) command.
150
151 newaliases_path (see 'postconf -d' output)
152 Sendmail compatibility feature that specifies the location of
153 the newaliases(1) command.
154
155 mailq_path (see 'postconf -d' output)
156 Sendmail compatibility feature that specifies where the Postfix
157 mailq(1) command is installed.
158
159 html_directory (see 'postconf -d' output)
160 The location of Postfix HTML files that describe how to build,
161 configure or operate a specific Postfix subsystem or feature.
162
163 manpage_directory (see 'postconf -d' output)
164 Where the Postfix manual pages are installed.
165
166 readme_directory (see 'postconf -d' output)
167 The location of Postfix README files that describe how to build,
168 configure or operate a specific Postfix subsystem or feature.
169
170 Available in Postfix version 2.5 and later:
171
172 data_directory (see 'postconf -d' output)
173 The directory with Postfix-writable data files (for example:
174 caches, pseudo-random numbers).
175
176 Other configuration parameters:
177
178 config_directory (see 'postconf -d' output)
179 The default location of the Postfix main.cf and master.cf con‐
180 figuration files.
181
182 import_environment (see 'postconf -d' output)
183 The list of environment parameters that a Postfix process will
184 import from a non-Postfix parent process.
185
186 syslog_facility (mail)
187 The syslog facility of Postfix logging.
188
189 syslog_name (see 'postconf -d' output)
190 The mail system name that is prepended to the process name in
191 syslog records, so that "smtpd" becomes, for example, "post‐
192 fix/smtpd".
193
194 Available in Postfix version 2.6 and later:
195
196 multi_instance_directories (empty)
197 An optional list of non-default Postfix configuration directo‐
198 ries; these directories belong to additional Postfix instances
199 that share the Postfix executable files and documentation with
200 the default Postfix instance, and that are started, stopped,
201 etc., together with the default Postfix instance.
202
203 multi_instance_wrapper (empty)
204 The pathname of a multi-instance manager command that the post‐
205 fix(1) command invokes when the multi_instance_directories
206 parameter value is non-empty.
207
208 multi_instance_group (empty)
209 The optional instance group name of this Postfix instance.
210
211 multi_instance_name (empty)
212 The optional instance name of this Postfix instance.
213
214 multi_instance_enable (no)
215 Allow this Postfix instance to be started, stopped, etc., by a
216 multi-instance manager.
217
219 Prior to Postfix version 2.6, all of the following files were in $con‐
220 fig_directory. Some files are now in $daemon_directory so that they can
221 be shared among multiple instances that run the same Postfix version.
222
223 Use the command "postconf config_directory" or "postconf daemon_direc‐
224 tory" to expand the names into their actual values.
225
226 $config_directory/main.cf, Postfix configuration parameters
227 $config_directory/master.cf, Postfix daemon processes
228 $daemon_directory/postfix-files, file/directory permissions
229 $daemon_directory/postfix-script, administrative commands
230 $daemon_directory/post-install, post-installation configuration
231
233 Commands:
234 postalias(1), create/update/query alias database
235 postcat(1), examine Postfix queue file
236 postconf(1), Postfix configuration utility
237 postfix(1), Postfix control program
238 postkick(1), trigger Postfix daemon
239 postlock(1), Postfix-compatible locking
240 postlog(1), Postfix-compatible logging
241 postmap(1), Postfix lookup table manager
242 postmulti(1), Postfix multi-instance manager
243 postqueue(1), Postfix mail queue control
244 postsuper(1), Postfix housekeeping
245 mailq(1), Sendmail compatibility interface
246 newaliases(1), Sendmail compatibility interface
247 sendmail(1), Sendmail compatibility interface
248
249 Postfix configuration:
250 bounce(5), Postfix bounce message templates
251 master(5), Postfix master.cf file syntax
252 postconf(5), Postfix main.cf file syntax
253 postfix-wrapper(5), Postfix multi-instance API
254
255 Table-driven mechanisms:
256 access(5), Postfix SMTP access control table
257 aliases(5), Postfix alias database
258 canonical(5), Postfix input address rewriting
259 generic(5), Postfix output address rewriting
260 header_checks(5), body_checks(5), Postfix content inspection
261 relocated(5), Users that have moved
262 transport(5), Postfix routing table
263 virtual(5), Postfix virtual aliasing
264
265 Table lookup mechanisms:
266 cidr_table(5), Associate CIDR pattern with value
267 ldap_table(5), Postfix LDAP client
268 memcache_table(5), Postfix memcache client
269 mysql_table(5), Postfix MYSQL client
270 nisplus_table(5), Postfix NIS+ client
271 pcre_table(5), Associate PCRE pattern with value
272 pgsql_table(5), Postfix PostgreSQL client
273 regexp_table(5), Associate POSIX regexp pattern with value
274 sqlite_table(5), Postfix SQLite database driver
275 tcp_table(5), Postfix client-server table lookup
276
277 Daemon processes:
278 anvil(8), Postfix connection/rate limiting
279 bounce(8), defer(8), trace(8), Delivery status reports
280 cleanup(8), canonicalize and enqueue message
281 discard(8), Postfix discard delivery agent
282 dnsblog(8), DNS black/whitelist logger
283 error(8), Postfix error delivery agent
284 flush(8), Postfix fast ETRN service
285 local(8), Postfix local delivery agent
286 master(8), Postfix master daemon
287 oqmgr(8), old Postfix queue manager
288 pickup(8), Postfix local mail pickup
289 pipe(8), deliver mail to non-Postfix command
290 postscreen(8), Postfix zombie blocker
291 proxymap(8), Postfix lookup table proxy server
292 qmgr(8), Postfix queue manager
293 qmqpd(8), Postfix QMQP server
294 scache(8), Postfix connection cache manager
295 showq(8), list Postfix mail queue
296 smtp(8), lmtp(8), Postfix SMTP+LMTP client
297 smtpd(8), Postfix SMTP server
298 spawn(8), run non-Postfix server
299 tlsmgr(8), Postfix TLS cache and randomness manager
300 tlsproxy(8), Postfix TLS proxy server
301 trivial-rewrite(8), Postfix address rewriting
302 verify(8), Postfix address verification
303 virtual(8), Postfix virtual delivery agent
304
305 Other:
306 syslogd(8), system logging
307
309 Use "postconf readme_directory" or "postconf html_directory" to locate
310 this information.
311 OVERVIEW, overview of Postfix commands and processes
312 BASIC_CONFIGURATION_README, Postfix basic configuration
313 ADDRESS_REWRITING_README, Postfix address rewriting
314 SMTPD_ACCESS_README, SMTP relay/access control
315 CONTENT_INSPECTION_README, Postfix content inspection
316 QSHAPE_README, Postfix queue analysis
317
319 The Secure Mailer license must be distributed with this software.
320
322 Wietse Venema
323 IBM T.J. Watson Research
324 P.O. Box 704
325 Yorktown Heights, NY 10598, USA
326
327 TLS support by:
328 Lutz Jaenicke
329 Brandenburg University of Technology
330 Cottbus, Germany
331
332 Victor Duchovni
333 Morgan Stanley
334
335 SASL support originally by:
336 Till Franke
337 SuSE Rhein/Main AG
338 65760 Eschborn, Germany
339
340 LMTP support originally by:
341 Philip A. Prindeville
342 Mirapoint, Inc.
343 USA.
344
345 Amos Gouaux
346 University of Texas at Dallas
347 P.O. Box 830688, MC34
348 Richardson, TX 75083, USA
349
350 IPv6 support originally by:
351 Mark Huizer, Eindhoven University, The Netherlands
352 Jun-ichiro 'itojun' Hagino, KAME project, Japan
353 The Linux PLD project
354 Dean Strik, Eindhoven University, The Netherlands
355
356
357
358 POSTFIX(1)