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) or postlogd(8), and to the standard
285       error stream.
286

ENVIRONMENT

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

CONFIGURATION PARAMETERS

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

COMPATIBILITY CONTROLS

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

TROUBLE SHOOTING CONTROLS

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

ACCESS CONTROLS

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

RESOURCE AND RATE CONTROLS

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

FAST FLUSH CONTROLS

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

VERP CONTROLS

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

MISCELLANEOUS CONTROLS

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

FILES

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

SEE ALSO

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

README_FILES

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

LICENSE

469       The Secure Mailer license must be distributed with this software.
470

AUTHOR(S)

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