1 .\" Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
2 .\" All rights reserved.
3 .\" Copyright (c) 1983, 1997 Eric P. Allman. All rights reserved.
4 .\" Copyright (c) 1988, 1991, 1993
5 .\" The Regents of the University of California. All rights reserved.
7 .\" By using this file, you agree to the terms and conditions set
8 .\" forth in the LICENSE file which can be found at the top level of
9 .\" the sendmail distribution.
12 .\" $Id: sendmail.8,v 8.60 2011/03/07 23:44:48 ca Exp $
14 .TH SENDMAIL 8 "$Date: 2011/03/07 23:44:48 $"
17 \- an electronic mail transport agent
20 .RI [ flags "] [" "address ..." ]
34 sends a message to one or more
36 routing the message over whatever networks
39 does internetwork forwarding as necessary
40 to deliver the message to the correct place.
43 is not intended as a user interface routine;
44 other programs provide user-friendly
47 is used only to deliver pre-formatted messages.
51 reads its standard input
53 or a line consisting only of a single dot
54 and sends a copy of the message found there
55 to all of the addresses listed.
56 It determines the network(s) to use
57 based on the syntax and contents of the addresses.
59 Local addresses are looked up in a file
60 and aliased appropriately.
61 Aliasing can be prevented by preceding the address
63 Beginning with 8.10, the sender is included in any alias
65 if `john' sends to `group',
66 and `group' includes `john' in the expansion,
67 then the letter will also be delivered to `john'.
71 Use submit.cf even if the operation mode does not indicate
72 an initial mail submission.
75 Use sendmail.cf even if the operation mode indicates
76 an initial mail submission.
81 Current legal values are
89 mode. All input lines must end with a CR-LF,
90 and all messages will be generated with a CR-LF at the end.
92 the ``From:'' and ``Sender:''
93 fields are examined for the name of the sender.
98 will fork and run in background
99 listening on socket 25 for incoming
102 This is normally run from
108 except runs in foreground.
111 Print the persistent host status database.
114 Purge expired entries from the persistent host status database.
117 Initialize the alias database.
120 Deliver mail in the usual way (default).
123 Print a listing of the queue(s).
126 Print number of entries in the queue(s);
127 only available with shared memory support.
132 protocol as described in
134 on standard input and output.
135 This flag implies all the operations of the
137 flag that are compatible with
141 Run in address test mode.
142 This mode reads addresses and shows the steps in parsing;
143 it is used for debugging configuration tables.
146 Verify names only \- do not try to collect or deliver a message.
147 Verify mode is normally used for validating
148 users or mailing lists.
151 Use alternate configuration file.
153 gives up any enhanced (set-user-ID or set-group-ID) privileges
154 if an alternate configuration file is specified.
157 Send debugging output to the indicated log file instead of stdout.
159 .BI \-d category . level...
160 Set the debugging flag for
165 is either an integer or a name specifying the topic, and
167 an integer specifying the level of debugging output desired.
168 Higher levels generally mean more output.
169 More than one flag can be specified by separating them with commas.
170 A list of numeric debugging categories can be found in the TRACEFLAGS file
171 in the sendmail source distribution.
175 prints the version of
177 and the options it was compiled with.
179 Most other categories are only useful with, and documented in,
185 Set the full name of the sender.
188 Sets the name of the ``from'' person
189 (i.e., the envelope sender of the mail).
190 This address may also be used in the From: header
191 if that header is missing during initial submission.
192 The envelope sender address is used as the recipient
193 for delivery status notifications
194 and may also appear in a Return-Path: header.
199 .IR root ", " daemon ,
202 or if the person you are trying to become
203 is the same as the person you are.
205 an X-Authentication-Warning header
206 will be added to the message.
209 Relay (gateway) submission of a message,
218 The hop count is incremented every time the mail is
220 When it reaches a limit,
221 the mail is returned with an error message,
222 the victim of an aliasing loop.
224 ``Received:'' lines in the message are counted.
227 Do not strip a leading dot from lines in incoming messages,
228 and do not treat a dot on a line by itself
229 as the end of an incoming message.
230 This should be set if you are reading data from a file.
233 Set the identifier used in syslog messages to the supplied
237 Set delivery status notification conditions to
242 or a comma separated list of the values
244 to be notified if delivery failed,
246 to be notified if delivery is delayed, and
248 to be notified when the message is successfully delivered.
253 \fB\-O\fP \fIoption\fR=\fIvalue\fR
258 This form uses long names. See below for more details.
265 This form uses single character names only.
266 The short names are not described in this manual page;
268 .I "Sendmail Installation and Operation Guide"
272 Set the name of the protocol used to receive the message.
273 This can be a simple protocol name such as ``UUCP''
274 or a protocol and hostname, such as ``UUCP:ucbvax''.
276 \fB\-q\fR[\fItime\fR]
277 Process saved messages in the queue at given intervals.
280 is omitted, process the queue once.
282 is given as a tagged number,
287 being minutes (default),
299 would both set the timeout to one hour thirty minutes.
302 will run in the background.
303 This option can be used safely with
306 \fB\-qp\fR[\fItime\fR]
307 Similar to \fB\-q\fItime\fR,
308 except that instead of periodically forking a child to process the queue,
309 sendmail forks a single persistent child for each queue
310 that alternates between processing the queue and sleeping.
311 The sleep time is given as the argument; it defaults to 1 second.
312 The process will always sleep at least 5 seconds if the queue was
313 empty in the previous queue run.
316 Process saved messages in the queue once and do not fork(),
317 but run in the foreground.
320 Process jobs in queue group called
324 \fB\-q\fR[\fI!\fR]I\fIsubstr\fR
325 Limit processed jobs to those containing
327 as a substring of the queue id or not when
331 \fB\-q\fR[\fI!\fR]Q\fIsubstr\fR
332 Limit processed jobs to quarantined jobs containing
334 as a substring of the quarantine reason or not when
338 \fB\-q\fR[\fI!\fR]R\fIsubstr\fR
339 Limit processed jobs to those containing
341 as a substring of one of the recipients or not when
345 \fB\-q\fR[\fI!\fR]S\fIsubstr\fR
346 Limit processed jobs to those containing
348 as a substring of the sender or not when
353 Quarantine a normal queue items with the given reason or
354 unquarantine quarantined queue items if no reason is given.
355 This should only be used with some sort of item matching using
359 Set the amount of the message to be returned
360 if the message bounces.
365 to return the entire message or
367 to return only the headers.
368 In the latter case also local bounces return only the headers.
371 An alternate and obsolete form of the
376 Read message for recipients.
377 To:, Cc:, and Bcc: lines will be scanned for recipient addresses.
378 The Bcc: line will be deleted before transmission.
381 Set the original envelope id.
382 This is propagated across SMTP to servers that support DSNs
383 and is returned in DSN-compliant error messages.
386 Go into verbose mode.
387 Alias expansions will be announced, etc.
390 Log all traffic in and out of mailers in the indicated log file.
391 This should only be used as a last resort
392 for debugging mailer bugs.
393 It will log a lot of data very quickly.
396 Stop processing command flags and use the rest of the arguments as
399 There are also a number of processing options that may be set.
400 Normally these will only be used by a system administrator.
401 Options may be set either on the command line
404 flag (for short names), the
406 flag (for long names),
407 or in the configuration file.
408 This is a partial list limited to those options that are likely to be useful
410 and only shows the long names;
411 for a complete list (and details), consult the
412 .IR "Sendmail Installation and Operation Guide" .
416 Use alternate alias file.
419 On mailers that are considered ``expensive'' to connect to,
420 don't initiate immediate connection.
421 This requires queueing.
423 .RI CheckpointInterval= N
424 Checkpoint the queue file after every
426 successful deliveries (default 10).
427 This avoids excessive duplicate deliveries
428 when sending to long mailing lists
429 interrupted by system crashes.
433 Set the delivery mode to
437 for interactive (synchronous) delivery,
439 for background (asynchronous) delivery,
441 for queue only \- i.e.,
442 actual delivery is done the next time the queue is run, and
444 for deferred \- the same as
446 except that database lookups for maps which have set the \-D option
447 (default for the host map) are avoided.
450 Set error processing to mode
454 to mail back the error message,
457 back the error message
458 (or mail it back if the sender is not logged in),
460 to print the errors on the terminal
463 to throw away error messages
464 (only exit status is returned),
467 to do special processing for the BerkNet.
468 If the text of the message is not mailed back
474 and if the sender is local to this machine,
475 a copy of the message is appended to the file
477 in the sender's home directory.
482 From lines at the front of messages.
485 The maximum number of times a message is allowed to ``hop''
486 before we decide it is in a loop.
489 Do not take dots on a line by themselves
490 as a message terminator.
493 Send error messages in MIME format.
494 If not set, the DSN (Delivery Status Notification) SMTP extension
497 .RI ConnectionCacheTimeout= timeout
498 Set connection cache timeout.
500 .RI ConnectionCacheSize= N
501 Set connection cache size.
507 Don't send to ``me'' (the sender) if I am in an alias expansion.
510 Validate the right hand side of aliases during a
515 If set, this message may have
518 this message is guaranteed to have new style headers
519 (i.e., commas instead of spaces between addresses).
520 If set, an adaptive algorithm is used that will correctly
521 determine the header format in most cases.
523 .RI QueueDirectory= queuedir
524 Select the directory in which to queue messages.
527 Save statistics in the named file.
529 .RI Timeout.queuereturn= time
530 Set the timeout on undelivered messages in the queue to the specified time.
531 After delivery has failed
532 (e.g., because of a host being down)
533 for this amount of time,
534 failed messages will be returned to the sender.
535 The default is five days.
537 .RI UserDatabaseSpec= userdatabase
538 If set, a user database is consulted to get forwarding information.
539 You can consider this an adjunct to the aliasing mechanism,
540 except that the database is intended to be distributed;
541 aliases are local to a particular host.
542 This may not be available if your sendmail does not have the
547 Fork each job during queue runs.
548 May be convenient on memory-poor machines.
551 Strip incoming messages to seven bits.
553 .RI EightBitMode= mode
554 Set the handling of eight bit input to seven bit destinations to
557 (mimefy) will convert to seven-bit MIME format,
559 (pass) will pass it as eight bits (but violates protocols),
562 (strict) will bounce the message.
564 .RI MinQueueAge= timeout
565 Sets how long a job must ferment in the queue between attempts to send it.
567 .RI DefaultCharSet= charset
568 Sets the default character set used to label 8-bit data
569 that is not otherwise labelled.
571 .RI DialDelay= sleeptime
572 If opening a connection fails,
575 seconds and try again.
576 Useful on dial-on-demand sites.
578 .RI NoRecipientAction= action
579 Set the behaviour when there are no recipient headers (To:, Cc: or
580 Bcc:) in the message to
583 leaves the message unchanged,
585 adds a To: header with the envelope recipients,
587 adds an Apparently-To: header with the envelope recipients,
589 adds an empty Bcc: header, and
591 adds a header reading
592 `To: undisclosed-recipients:;'.
594 .RI MaxDaemonChildren= N
595 Sets the maximum number of children that an incoming SMTP daemon
596 will allow to spawn at any time to
599 .RI ConnectionRateThrottle= N
600 Sets the maximum number of connections per second to the SMTP port to
604 the first character of a name may be
605 a vertical bar to cause interpretation of
606 the rest of the name as a command
608 It may be necessary to quote the name
611 from suppressing the blanks from between arguments.
612 For example, a common alias is:
614 msgs: "|/usr/bin/msgs -s"
616 Aliases may also have the syntax
617 .RI ``:include: filename ''
620 to read the named file for a list of recipients.
621 For example, an alias such as:
623 poets: ":include:/usr/local/lib/poets.list"
626 .I /usr/local/lib/poets.list
627 for the list of addresses making up the group.
630 returns an exit status
631 describing what it did.
632 The codes are defined in
636 Successful completion on all addresses.
639 User name not recognized.
642 Catchall meaning necessary resources
646 Syntax error in address.
649 Internal software error,
650 including bad arguments.
653 Temporary operating system error,
658 Host name not recognized.
661 Message could not be sent immediately,
667 will rebuild the alias database. If invoked as
670 will print the contents of the mail queue.
674 will print the persistent host status database.
678 will purge expired entries from the persistent host status database.
682 will act as a daemon, as if the
684 option were specified.
687 often gets blamed for many problems
688 that are actually the result of other problems,
689 such as overly permissive modes on directories.
692 checks the modes on system directories and files
693 to determine if they can be trusted.
694 Although these checks can be turned off
695 and your system security reduced by setting the
696 .BR DontBlameSendmail
698 the permission problems should be fixed.
699 For more information, see:
701 .I http://www.sendmail.org/tips/DontBlameSendmail.html
704 .I /etc/mail/sendmail.cf
705 itself the following pathnames are all specified in
706 .IR /etc/mail/sendmail.cf .
708 these values are only approximations.
712 raw data for alias names
715 data base of alias names
717 /etc/mail/sendmail.cf
738 Internet Request For Comments
742 .IR "Sendmail Installation and Operation Guide" ,
745 http://www.sendmail.org/
747 US Patent Numbers 6865671, 6986037.