1SENDMAIL(1)                 General Commands Manual                SENDMAIL(1)
2
3
4

NAME

6       sendmail - Postfix to Sendmail compatibility interface
7

SYNOPSIS

9       sendmail [option ...] [recipient ...]
10
11       mailq
12       sendmail -bp
13
14       newaliases
15       sendmail -I
16

DESCRIPTION

18       The Postfix sendmail(1) command implements the Postfix to Sendmail com‐
19       patibility interface.  For the  sake  of  compatibility  with  existing
20       applications,  some  Sendmail  command-line  options are recognized but
21       silently ignored.
22
23       By default, Postfix sendmail(1) reads a  message  from  standard  input
24       until  EOF  or  until  it  reads  a  line  with only a . character, and
25       arranges for delivery.  Postfix sendmail(1) relies on  the  postdrop(1)
26       command to create a queue file in the maildrop directory.
27
28       Specific  command aliases are provided for other common modes of opera‐
29       tion:
30
31       mailq  List the mail queue. Each entry shows the queue file ID, message
32              size,  arrival  time, sender, and the recipients that still need
33              to be delivered.  If mail could not be delivered upon  the  last
34              attempt, the reason for failure is shown. The queue ID string is
35              followed by an optional status character:
36
37              *      The message is in the active queue, i.e. the  message  is
38                     selected for delivery.
39
40              !      The  message is in the hold queue, i.e. no further deliv‐
41                     ery attempt will be made until  the  mail  is  taken  off
42                     hold.
43
44              This   mode   of  operation  is  implemented  by  executing  the
45              postqueue(1) command.
46
47       newaliases
48              Initialize the alias database.  If no input  file  is  specified
49              (with  the  -oA  option,  see  below), the program processes the
50              file(s) specified with the alias_database configuration  parame‐
51              ter.   If  no alias database type is specified, the program uses
52              the type specified with the default_database_type  configuration
53              parameter.  This mode of operation is implemented by running the
54              postalias(1) command.
55
56              Note: it may take a minute or so before an alias database update
57              becomes  visible.  Use the "postfix reload" command to eliminate
58              this delay.
59
60       These and other features can be selected by specifying the  appropriate
61       combination  of  command-line  options. Some features are controlled by
62       parameters in the main.cf configuration file.
63
64       The following options are recognized:
65
66       -Am (ignored)
67
68       -Ac (ignored)
69              Postfix sendmail uses the same configuration file regardless  of
70              whether or not a message is an initial submission.
71
72       -B body_type
73              The message body MIME type: 7BIT or 8BITMIME.
74
75       -bd    Go  into  daemon  mode. This mode of operation is implemented by
76              executing the "postfix start" command.
77
78       -bh (ignored)
79
80       -bH (ignored)
81              Postfix has no persistent host status database.
82
83       -bi    Initialize alias database. See the newaliases command above.
84
85       -bl    Go into daemon mode. To accept only local  connections  as  with
86              Sendmail´s  -bl  option, specify "inet_interfaces = loopback" in
87              the Postfix main.cf configuration file.
88
89       -bm    Read mail from standard input and arrange for delivery.  This is
90              the default mode of operation.
91
92       -bp    List the mail queue. See the mailq command above.
93
94       -bs    Stand-alone  SMTP  server mode. Read SMTP commands from standard
95              input, and write responses to standard output.   In  stand-alone
96              SMTP  server  mode,  mail relaying and other access controls are
97              disabled by default. To enable them,  run  the  process  as  the
98              mail_owner user.
99
100              This  mode  of  operation is implemented by running the smtpd(8)
101              daemon.
102
103       -bv    Do not collect or deliver a  message.  Instead,  send  an  email
104              report  after  verifying each recipient address.  This is useful
105              for testing address rewriting and routing configurations.
106
107              This feature is available in Postfix version 2.1 and later.
108
109       -C config_file
110
111       -C config_dir
112              The path name of the Postfix main.cf  file,  or  of  its  parent
113              directory.  This  information  is  ignored with Postfix versions
114              before 2.3.
115
116              With Postfix version 3.2 and later, a non-default directory must
117              be  authorized  in  the default main.cf file, through the alter‐
118              nate_config_directories  or  multi_instance_directories  parame‐
119              ters.
120
121              With  all Postfix versions, you can specify a directory pathname
122              with the MAIL_CONFIG environment variable to override the  loca‐
123              tion of configuration files.
124
125       -F full_name
126              Set  the  sender  full name. This overrides the NAME environment
127              variable, and is used only with messages that have no From: mes‐
128              sage header.
129
130       -f sender
131              Set  the  envelope  sender  address.  This  is the address where
132              delivery problems are sent to. With Postfix versions before 2.1,
133              the   Errors-To:  message  header  overrides  the  error  return
134              address.
135
136       -G     Gateway (relay) submission, as opposed to initial  user  submis‐
137              sion.   Either do not rewrite addresses at all, or update incom‐
138              plete addresses  with  the  domain  information  specified  with
139              remote_header_rewrite_domain.
140
141              This option is ignored before Postfix version 2.3.
142
143       -h hop_count (ignored)
144              Hop  count limit. Use the hopcount_limit configuration parameter
145              instead.
146
147       -I     Initialize alias database. See the newaliases command above.
148
149       -i     When reading a message from standard input, don´t treat  a  line
150              with only a . character as the end of input.
151
152       -L label (ignored)
153              The  logging  label. Use the syslog_name configuration parameter
154              instead.
155
156       -m (ignored)
157              Backwards compatibility.
158
159       -N dsn (default: 'delay, failure')
160              Delivery  status  notification   control.   Specify   either   a
161              comma-separated list with one or more of failure (send notifica‐
162              tion when delivery fails), delay (send notification when  deliv‐
163              ery  is delayed), or success (send notification when the message
164              is delivered); or specify never (don't send any notifications at
165              all).
166
167              This feature is available in Postfix 2.3 and later.
168
169       -n (ignored)
170              Backwards compatibility.
171
172       -oAalias_database
173              Non-default  alias  database. Specify pathname or type:pathname.
174              See postalias(1) for details.
175
176       -O option=value (ignored)
177              Set the named option to value. Use the equivalent  configuration
178              parameter in main.cf instead.
179
180       -o7 (ignored)
181
182       -o8 (ignored)
183              To  send 8-bit or binary content, use an appropriate MIME encap‐
184              sulation and specify the appropriate -B command-line option.
185
186       -oi    When reading a message from standard input, don´t treat  a  line
187              with only a . character as the end of input.
188
189       -om (ignored)
190              The sender is never eliminated from alias etc. expansions.
191
192       -o x value (ignored)
193              Set  option x to value. Use the equivalent configuration parame‐
194              ter in main.cf instead.
195
196       -r sender
197              Set the envelope sender  address.  This  is  the  address  where
198              delivery problems are sent to. With Postfix versions before 2.1,
199              the  Errors-To:  message  header  overrides  the  error   return
200              address.
201
202       -R return
203              Delivery  status notification control.  Specify "hdrs" to return
204              only the header when a message bounces, "full" to return a  full
205              copy (the default behavior).
206
207              The -R option specifies an upper bound; Postfix will return only
208              the header, when a full copy would exceed the  bounce_size_limit
209              setting.
210
211              This option is ignored before Postfix version 2.10.
212
213       -q     Attempt  to deliver all queued mail. This is implemented by exe‐
214              cuting the postqueue(1) command.
215
216              Warning: flushing undeliverable mail frequently will  result  in
217              poor delivery performance of all other mail.
218
219       -qinterval (ignored)
220              The interval between queue runs. Use the queue_run_delay config‐
221              uration parameter instead.
222
223       -qIqueueid
224              Schedule immediate delivery of mail with the specified queue ID.
225              This  option  is  implemented by executing the postqueue(1) com‐
226              mand, and is available with Postfix version 2.4 and later.
227
228       -qRsite
229              Schedule immediate delivery of all mail that is queued  for  the
230              named  site. This option accepts only site names that are eligi‐
231              ble for the "fast flush" service, and is implemented by  execut‐
232              ing the postqueue(1) command.  See flush(8) for more information
233              about the "fast flush" service.
234
235       -qSsite
236              This command is not implemented. Use the  slower  "sendmail  -q"
237              command instead.
238
239       -t     Extract  recipients from message headers. These are added to any
240              recipients specified on the command line.
241
242              With Postfix versions prior to 2.1, this option requires that no
243              recipient addresses are specified on the command line.
244
245       -U (ignored)
246              Initial user submission.
247
248       -V envid
249              Specify the envelope ID for notification by servers that support
250              DSN.
251
252              This feature is available in Postfix 2.3 and later.
253
254       -XV (Postfix 2.2 and earlier: -V)
255              Variable Envelope Return Path. Given an envelope sender  address
256              of  the  form  owner-listname@origin, each recipient user@domain
257              receives mail with a personalized envelope sender address.
258
259              By  default,  the  personalized  envelope  sender   address   is
260              owner-listname+user=domain@origin.  The  default + and = charac‐
261              ters are configurable with the default_verp_delimiters  configu‐
262              ration parameter.
263
264       -XVxy (Postfix 2.2 and earlier: -Vxy)
265              As  -XV,  but  uses  x  and  y as the VERP delimiter characters,
266              instead of the characters specified with the default_verp_delim‐
267              iters configuration parameter.
268
269       -v     Send an email report of the first delivery attempt (Postfix ver‐
270              sions 2.1 and later). Mail delivery always happens in the  back‐
271              ground.  When multiple -v options are given, enable verbose log‐
272              ging for debugging purposes.
273
274       -X log_file (ignored)
275              Log mailer traffic. Use the debug_peer_list and debug_peer_level
276              configuration parameters instead.
277

SECURITY

279       By design, this program is not set-user (or group) id. However, it must
280       handle data from untrusted, possibly remote, users.   Thus,  the  usual
281       precautions need to be taken against malicious inputs.
282

DIAGNOSTICS

284       Problems are logged to syslogd(8) and to the standard error stream.
285

ENVIRONMENT

287       MAIL_CONFIG
288              Directory with Postfix configuration files.
289
290       MAIL_VERBOSE (value does not matter)
291              Enable verbose logging for debugging purposes.
292
293       MAIL_DEBUG (value does not matter)
294              Enable debugging with an external command, as specified with the
295              debugger_command configuration parameter.
296
297       NAME   The sender full name. This is used only with messages that  have
298              no From: message header. See also the -F option above.
299

CONFIGURATION PARAMETERS

301       The  following  main.cf parameters are especially relevant to this pro‐
302       gram.  The text below provides only  a  parameter  summary.  See  post‐
303       conf(5) for more details including examples.
304

COMPATIBILITY CONTROLS

306       Available with Postfix 2.9 and later:
307
308       sendmail_fix_line_endings (always)
309              Controls how the Postfix sendmail command converts email message
310              line endings from <CR><LF> into UNIX format (<LF>).
311

TROUBLE SHOOTING CONTROLS

313       The DEBUG_README file gives examples of how to trouble shoot a  Postfix
314       system.
315
316       debugger_command (empty)
317              The external command to execute when a Postfix daemon program is
318              invoked with the -D option.
319
320       debug_peer_level (2)
321              The increment in verbose logging level when a remote  client  or
322              server matches a pattern in the debug_peer_list parameter.
323
324       debug_peer_list (empty)
325              Optional  list  of  remote  client or server hostname or network
326              address  patterns  that  cause  the  verbose  logging  level  to
327              increase by the amount specified in $debug_peer_level.
328

ACCESS CONTROLS

330       Available in Postfix version 2.2 and later:
331
332       authorized_flush_users (static:anyone)
333              List of users who are authorized to flush the queue.
334
335       authorized_mailq_users (static:anyone)
336              List of users who are authorized to view the queue.
337
338       authorized_submit_users (static:anyone)
339              List  of  users who are authorized to submit mail with the send‐
340              mail(1) command (and with the privileged postdrop(1) helper com‐
341              mand).
342

RESOURCE AND RATE CONTROLS

344       bounce_size_limit (50000)
345              The  maximal  amount  of original message text that is sent in a
346              non-delivery notification.
347
348       fork_attempts (5)
349              The maximal number of attempts to fork() a child process.
350
351       fork_delay (1s)
352              The delay between attempts to fork() a child process.
353
354       hopcount_limit (50)
355              The maximal number of Received:  message headers that is allowed
356              in the primary message headers.
357
358       queue_run_delay (300s)
359              The  time  between  deferred  queue  scans by the queue manager;
360              prior to Postfix 2.4 the default value was 1000s.
361

FAST FLUSH CONTROLS

363       The ETRN_README file describes configuration and operation details  for
364       the Postfix "fast flush" service.
365
366       fast_flush_domains ($relay_domains)
367              Optional list of destinations that are eligible for per-destina‐
368              tion logfiles with mail that is queued to those destinations.
369

VERP CONTROLS

371       The VERP_README file describes configuration and operation  details  of
372       Postfix support for variable envelope return path addresses.
373
374       default_verp_delimiters (+=)
375              The two default VERP delimiter characters.
376
377       verp_delimiter_filter (-=+)
378              The  characters  Postfix accepts as VERP delimiter characters on
379              the Postfix sendmail(1) command line and in SMTP commands.
380

MISCELLANEOUS CONTROLS

382       alias_database (see 'postconf -d' output)
383              The alias databases for local(8) delivery that are updated  with
384              "newaliases" or with "sendmail -bi".
385
386       command_directory (see 'postconf -d' output)
387              The location of all postfix administrative commands.
388
389       config_directory (see 'postconf -d' output)
390              The  default  location of the Postfix main.cf and master.cf con‐
391              figuration files.
392
393       daemon_directory (see 'postconf -d' output)
394              The directory with Postfix support programs and daemon programs.
395
396       default_database_type (see 'postconf -d' output)
397              The default database type for use in newaliases(1), postalias(1)
398              and postmap(1) commands.
399
400       delay_warning_time (0h)
401              The  time  after which the sender receives a copy of the message
402              headers of mail that is still queued.
403
404       import_environment (see 'postconf -d' output)
405              The list of environment parameters  that  a  privileged  Postfix
406              process  will  import  from  a  non-Postfix  parent  process, or
407              name=value environment overrides.
408
409       mail_owner (postfix)
410              The UNIX system account that owns the  Postfix  queue  and  most
411              Postfix daemon processes.
412
413       queue_directory (see 'postconf -d' output)
414              The location of the Postfix top-level queue directory.
415
416       remote_header_rewrite_domain (empty)
417              Don't  rewrite  message  headers from remote clients at all when
418              this parameter is empty; otherwise, rewrite message headers  and
419              append the specified domain name to incomplete addresses.
420
421       syslog_facility (mail)
422              The syslog facility of Postfix logging.
423
424       syslog_name (see 'postconf -d' output)
425              A  prefix  that  is  prepended  to  the  process  name in syslog
426              records, so that, for example, "smtpd" becomes "prefix/smtpd".
427
428       Postfix 3.2 and later:
429
430       alternate_config_directories (empty)
431              A list of non-default Postfix configuration directories that may
432              be  specified with "-c config_directory" on the command line (in
433              the case of sendmail(1), with  the  "-C"  option),  or  via  the
434              MAIL_CONFIG environment parameter.
435
436       multi_instance_directories (empty)
437              An  optional  list of non-default Postfix configuration directo‐
438              ries; these directories belong to additional  Postfix  instances
439              that  share  the Postfix executable files and documentation with
440              the default Postfix instance, and  that  are  started,  stopped,
441              etc., together with the default Postfix instance.
442

FILES

444       /var/spool/postfix, mail queue
445       /etc/postfix, configuration files
446

SEE ALSO

448       pickup(8), mail pickup daemon
449       qmgr(8), queue manager
450       smtpd(8), SMTP server
451       flush(8), fast flush service
452       postsuper(1), queue maintenance
453       postalias(1), create/update/query alias database
454       postdrop(1), mail posting utility
455       postfix(1), mail system control
456       postqueue(1), mail queue control
457       syslogd(8), system logging
458

README_FILES

460       Use  "postconf readme_directory" or "postconf html_directory" to locate
461       this information.
462       DEBUG_README, Postfix debugging howto
463       ETRN_README, Postfix ETRN howto
464       VERP_README, Postfix VERP howto
465

LICENSE

467       The Secure Mailer license must be distributed with this software.
468

AUTHOR(S)

470       Wietse Venema
471       IBM T.J. Watson Research
472       P.O. Box 704
473       Yorktown Heights, NY 10598, USA
474
475       Wietse Venema
476       Google, Inc.
477       111 8th Avenue
478       New York, NY 10011, USA
479
480
481
482                                                                   SENDMAIL(1)
Impressum