1 .\" Copyright (c) 1998-2003 Proofpoint, 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.61 2013-11-22 20:51:56 ca Exp $
14 .TH SENDMAIL 8 "$Date: 2013-11-22 20:51:56 $"
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.
96 Check the configuration file.
101 will fork and run in background
102 listening on socket 25 for incoming
105 This is normally run from
111 except runs in foreground.
114 Print the persistent host status database.
117 Purge expired entries from the persistent host status database.
120 Initialize the alias database.
123 Deliver mail in the usual way (default).
126 Print a listing of the queue(s).
129 Print number of entries in the queue(s);
130 only available with shared memory support.
135 protocol as described in
137 on standard input and output.
138 This flag implies all the operations of the
140 flag that are compatible with
144 Run in address test mode.
145 This mode reads addresses and shows the steps in parsing;
146 it is used for debugging configuration tables.
149 Verify names only \- do not try to collect or deliver a message.
150 Verify mode is normally used for validating
151 users or mailing lists.
154 Use alternate configuration file.
156 gives up any enhanced (set-user-ID or set-group-ID) privileges
157 if an alternate configuration file is specified.
160 Send debugging output to the indicated log file instead of stdout.
162 .BI \-d category . level...
163 Set the debugging flag for
168 is either an integer or a name specifying the topic, and
170 an integer specifying the level of debugging output desired.
171 Higher levels generally mean more output.
172 More than one flag can be specified by separating them with commas.
173 A list of numeric debugging categories can be found in the TRACEFLAGS file
174 in the sendmail source distribution.
178 prints the version of
180 and the options it was compiled with.
182 Most other categories are only useful with, and documented in,
188 Set the full name of the sender.
191 Sets the name of the ``from'' person
192 (i.e., the envelope sender of the mail).
193 This address may also be used in the From: header
194 if that header is missing during initial submission.
195 The envelope sender address is used as the recipient
196 for delivery status notifications
197 and may also appear in a Return-Path: header.
202 .IR root ", " daemon ,
205 or if the person you are trying to become
206 is the same as the person you are.
208 an X-Authentication-Warning header
209 will be added to the message.
212 Relay (gateway) submission of a message,
221 The hop count is incremented every time the mail is
223 When it reaches a limit,
224 the mail is returned with an error message,
225 the victim of an aliasing loop.
227 ``Received:'' lines in the message are counted.
230 Do not strip a leading dot from lines in incoming messages,
231 and do not treat a dot on a line by itself
232 as the end of an incoming message.
233 This should be set if you are reading data from a file.
236 Set the identifier used in syslog messages to the supplied
240 Set delivery status notification conditions to
245 or a comma separated list of the values
247 to be notified if delivery failed,
249 to be notified if delivery is delayed, and
251 to be notified when the message is successfully delivered.
256 \fB\-O\fP \fIoption\fR=\fIvalue\fR
261 This form uses long names. See below for more details.
268 This form uses single character names only.
269 The short names are not described in this manual page;
271 .I "Sendmail Installation and Operation Guide"
275 Set the name of the protocol used to receive the message.
276 This can be a simple protocol name such as ``UUCP''
277 or a protocol and hostname, such as ``UUCP:ucbvax''.
279 \fB\-q\fR[\fItime\fR]
280 Process saved messages in the queue at given intervals.
283 is omitted, process the queue once.
285 is given as a tagged number,
290 being minutes (default),
302 would both set the timeout to one hour thirty minutes.
305 will run in the background.
306 This option can be used safely with
309 \fB\-qp\fR[\fItime\fR]
310 Similar to \fB\-q\fItime\fR,
311 except that instead of periodically forking a child to process the queue,
312 sendmail forks a single persistent child for each queue
313 that alternates between processing the queue and sleeping.
314 The sleep time is given as the argument; it defaults to 1 second.
315 The process will always sleep at least 5 seconds if the queue was
316 empty in the previous queue run.
319 Process saved messages in the queue once and do not fork(),
320 but run in the foreground.
323 Process jobs in queue group called
327 \fB\-q\fR[\fI!\fR]I\fIsubstr\fR
328 Limit processed jobs to those containing
330 as a substring of the queue id or not when
334 \fB\-q\fR[\fI!\fR]Q\fIsubstr\fR
335 Limit processed jobs to quarantined jobs containing
337 as a substring of the quarantine reason or not when
341 \fB\-q\fR[\fI!\fR]R\fIsubstr\fR
342 Limit processed jobs to those containing
344 as a substring of one of the recipients or not when
348 \fB\-q\fR[\fI!\fR]S\fIsubstr\fR
349 Limit processed jobs to those containing
351 as a substring of the sender or not when
356 Quarantine a normal queue items with the given reason or
357 unquarantine quarantined queue items if no reason is given.
358 This should only be used with some sort of item matching using
362 Set the amount of the message to be returned
363 if the message bounces.
368 to return the entire message or
370 to return only the headers.
371 In the latter case also local bounces return only the headers.
374 An alternate and obsolete form of the
379 Read message for recipients.
380 To:, Cc:, and Bcc: lines will be scanned for recipient addresses.
381 The Bcc: line will be deleted before transmission.
384 Set the original envelope id.
385 This is propagated across SMTP to servers that support DSNs
386 and is returned in DSN-compliant error messages.
389 Go into verbose mode.
390 Alias expansions will be announced, etc.
393 Log all traffic in and out of mailers in the indicated log file.
394 This should only be used as a last resort
395 for debugging mailer bugs.
396 It will log a lot of data very quickly.
399 Stop processing command flags and use the rest of the arguments as
402 There are also a number of processing options that may be set.
403 Normally these will only be used by a system administrator.
404 Options may be set either on the command line
407 flag (for short names), the
409 flag (for long names),
410 or in the configuration file.
411 This is a partial list limited to those options that are likely to be useful
413 and only shows the long names;
414 for a complete list (and details), consult the
415 .IR "Sendmail Installation and Operation Guide" .
419 Use alternate alias file.
422 On mailers that are considered ``expensive'' to connect to,
423 don't initiate immediate connection.
424 This requires queueing.
426 .RI CheckpointInterval= N
427 Checkpoint the queue file after every
429 successful deliveries (default 10).
430 This avoids excessive duplicate deliveries
431 when sending to long mailing lists
432 interrupted by system crashes.
436 Set the delivery mode to
440 for interactive (synchronous) delivery,
442 for background (asynchronous) delivery,
444 for queue only \- i.e.,
445 actual delivery is done the next time the queue is run, and
447 for deferred \- the same as
449 except that database lookups for maps which have set the \-D option
450 (default for the host map) are avoided.
453 Set error processing to mode
457 to mail back the error message,
460 back the error message
461 (or mail it back if the sender is not logged in),
463 to print the errors on the terminal
466 to throw away error messages
467 (only exit status is returned),
470 to do special processing for the BerkNet.
471 If the text of the message is not mailed back
477 and if the sender is local to this machine,
478 a copy of the message is appended to the file
480 in the sender's home directory.
485 From lines at the front of messages.
488 The maximum number of times a message is allowed to ``hop''
489 before we decide it is in a loop.
492 Do not take dots on a line by themselves
493 as a message terminator.
496 Send error messages in MIME format.
497 If not set, the DSN (Delivery Status Notification) SMTP extension
500 .RI ConnectionCacheTimeout= timeout
501 Set connection cache timeout.
503 .RI ConnectionCacheSize= N
504 Set connection cache size.
510 Don't send to ``me'' (the sender) if I am in an alias expansion.
513 Validate the right hand side of aliases during a
518 If set, this message may have
521 this message is guaranteed to have new style headers
522 (i.e., commas instead of spaces between addresses).
523 If set, an adaptive algorithm is used that will correctly
524 determine the header format in most cases.
526 .RI QueueDirectory= queuedir
527 Select the directory in which to queue messages.
530 Save statistics in the named file.
532 .RI Timeout.queuereturn= time
533 Set the timeout on undelivered messages in the queue to the specified time.
534 After delivery has failed
535 (e.g., because of a host being down)
536 for this amount of time,
537 failed messages will be returned to the sender.
538 The default is five days.
540 .RI UserDatabaseSpec= userdatabase
541 If set, a user database is consulted to get forwarding information.
542 You can consider this an adjunct to the aliasing mechanism,
543 except that the database is intended to be distributed;
544 aliases are local to a particular host.
545 This may not be available if your sendmail does not have the
550 Fork each job during queue runs.
551 May be convenient on memory-poor machines.
554 Strip incoming messages to seven bits.
556 .RI EightBitMode= mode
557 Set the handling of eight bit input to seven bit destinations to
560 (mimefy) will convert to seven-bit MIME format,
562 (pass) will pass it as eight bits (but violates protocols),
565 (strict) will bounce the message.
567 .RI MinQueueAge= timeout
568 Sets how long a job must ferment in the queue between attempts to send it.
570 .RI DefaultCharSet= charset
571 Sets the default character set used to label 8-bit data
572 that is not otherwise labelled.
574 .RI DialDelay= sleeptime
575 If opening a connection fails,
578 seconds and try again.
579 Useful on dial-on-demand sites.
581 .RI NoRecipientAction= action
582 Set the behaviour when there are no recipient headers (To:, Cc: or
583 Bcc:) in the message to
586 leaves the message unchanged,
588 adds a To: header with the envelope recipients,
590 adds an Apparently-To: header with the envelope recipients,
592 adds an empty Bcc: header, and
594 adds a header reading
595 `To: undisclosed-recipients:;'.
597 .RI MaxDaemonChildren= N
598 Sets the maximum number of children that an incoming SMTP daemon
599 will allow to spawn at any time to
602 .RI ConnectionRateThrottle= N
603 Sets the maximum number of connections per second to the SMTP port to
607 the first character of a name may be
608 a vertical bar to cause interpretation of
609 the rest of the name as a command
611 It may be necessary to quote the name
614 from suppressing the blanks from between arguments.
615 For example, a common alias is:
617 msgs: "|/usr/bin/msgs -s"
619 Aliases may also have the syntax
620 .RI ``:include: filename ''
623 to read the named file for a list of recipients.
624 For example, an alias such as:
626 poets: ":include:/usr/local/lib/poets.list"
629 .I /usr/local/lib/poets.list
630 for the list of addresses making up the group.
633 returns an exit status
634 describing what it did.
635 The codes are defined in
639 Successful completion on all addresses.
642 User name not recognized.
645 Catchall meaning necessary resources
649 Syntax error in address.
652 Internal software error,
653 including bad arguments.
656 Temporary operating system error,
661 Host name not recognized.
664 Message could not be sent immediately,
670 will rebuild the alias database. If invoked as
673 will print the contents of the mail queue.
677 will print the persistent host status database.
681 will purge expired entries from the persistent host status database.
685 will act as a daemon, as if the
687 option were specified.
690 often gets blamed for many problems
691 that are actually the result of other problems,
692 such as overly permissive modes on directories.
695 checks the modes on system directories and files
696 to determine if they can be trusted.
697 Although these checks can be turned off
698 and your system security reduced by setting the
699 .BR DontBlameSendmail
701 the permission problems should be fixed.
702 For more information, see:
704 .I http://www.sendmail.org/tips/DontBlameSendmail.html
707 .I /etc/mail/sendmail.cf
708 itself the following pathnames are all specified in
709 .IR /etc/mail/sendmail.cf .
711 these values are only approximations.
715 raw data for alias names
718 data base of alias names
720 /etc/mail/sendmail.cf
741 Internet Request For Comments
745 .IR "Sendmail Installation and Operation Guide" ,
748 http://www.sendmail.org/
750 US Patent Numbers 6865671, 6986037.