Linux Command Directory
This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
sendmail [flags] [address...]
System administration command. sendmail is a mail transfer agent (MTA)
End of options marker. Only addresses should follow this option.
Use local submission configuration file /etc/mail/submit.cf, even when no mail is sent from the command line.
Use configuration file /etc/mail/sendmail.cf, even when mail is sent from the command line.
Set message body type. Accepted values are 7BIT and 8BITMIME.
Set operation mode to x. Operation modes are:
Run in ARPAnet mode.
Run as a daemon.
Run as a daemon, but remain in the foreground.
Print persistent host status information.
Purge expired entries from persistent host status information.
Initialize the alias database.
Deliver mail (the default).
Print the mail queue.
Speak SMTP on input side.
Run in test mode.
Verify addresses; do not collect or deliver.
Use configuration file file.
Set debugging level.
Set full name of user to name.
Sender's name is name.
Relay message submission. Used by rmail.
Do not interpret dots on a line by themselves as a message terminator.
Set hop count (number of times message has been processed by sendmail) to cnt.
Use the specified log identifier for messages sent to syslogd.
Specify conditions for delivery status notification (DSN) as a comma-separated list. Accepted values are never, delay, failure, and success.
Do not alias or forward.
Set an option specified by its long name. Options are described in the next section.
Set an option specified by its short name X. Options are described in the next section.
Receive messages via the protocol protocol.
Process queued messages immediately, or at intervals indicated by time (for example, -q30m for every half hour).
Same as -q, but create a persistent process to handle the queue instead of initiating a new process at each time interval.
Process saved messages in the queue using the foreground process.
Process saved messages in the named queue group.
Process jobs for named queues containing substring. Use ! to process mail for all queues not containing substring.
Process quarantined messages containing substring. Use ! to process mail for recipients not containing substring.
Process jobs with recipients containing substring. Use ! to process mail for recipients not containing substring.
Process jobs from senders containing substring. Use ! to process mail from senders not containing substring.
Quarantine messages for the given reason. Use query options above to specify the message to quarantine.
When bouncing messages, return only the specified portion of the bounced message. portion may be hdrs for headers, or full for the full message.
Read header for To:, Cc:, and Bcc: lines, and send to everyone on those lists.
Use envid as the original envelope ID.
Log all traffic to file. Not to be used for normal logging.
Command-line configuration options
Use alternate alias file.
If the D option is set, wait min minutes for the aliases file to be rebuilt before returning an alias database out-of-date warning.
Set unquoted space replacement character.
When running newaliases, validate the right side of aliases.
Checkpoint the queue when mailing to multiple recipients. sendmail will rewrite the list of recipients after each group of num recipients has been processed.
Multiplier for priority increments. This determines how much weight to give to a message's precedence header. sendmail's default is 1800.
Specify the maximum number of open connections to cache.
Time out connections after timeout.
Restrict SMTP connections per second to num.
Use user ID and group ID for mailers instead of 1:1. If no group ID is specified, the user's default group is used.
Use the specified label for 8-bit data.
Set the delivery mode to x. Delivery modes are d for deferred delivery, i for interactive (synchronous) delivery, b for background (asynchronous) delivery, and q for queue only (i.e., deliver the next time the queue is run).
Specify the number of seconds to wait before redialing after a connection fails.
Don't prune route addresses.
Specify how to handle 8-bit input. Accepted values for mode are mimefy (convert to 7-bit), pass (send as is), or strict (bounce the message).
Set error-message header. text is either text to add to an error message, or the name of a file. A filename must include its full path and begin with a /.
Set error processing to mode x. Valid modes are m to mail back the error message, w to write back the error message, p to print the errors on the terminal (default), q to throw away error messages, and e to do special processing for the BerkNet.
Set fallback MX host. host should be the fully qualified domain name of the fallback host.
Deliver each job that is run from the queue in a separate process. This helps limit the size of running processes on systems with very low amounts of memory.
Set an alternative .forward search path.
Specify SMTP help file to use instead of /etc/mail/helpfile.
On mailers that are considered "expensive" to connect to, don't initiate immediate connection.
Do not take dots on a line by themselves as a message terminator.
Specify log level. Default is 9.
Compare local mail names to the GECOS section in the password file.
Restrict incoming SMTP daemon to no more than num child processes.
Allow a maximum of num hops per message.
Also send to me (the sender) if I am in an alias expansion.
Require at least minblocks on the filesystem to be free.
Wait the specified time before processing a new job in the queue.
Specify what headers, if any, to add to a message without recipient headers. Accepted values are none, add-to, add-apparently-to, add-bcc, and add-to-undisclosed.
If set, this message may have old-style headers. If not set, this message is guaranteed to have new-style headers (i.e., commas instead of spaces between addresses).
Send copies of all failed mail to user (usually postmaster).
Adjust the privacy of the SMTP daemon. The optionlist argument should be a comma-separated list of the following values:
Make SMTP fully public (the default).
Require site to send HELO or ELHO before sending mail.
Require site to send HELO or ELHO before answering an address expansion request.
Like preceding argument, but for verification requests.
Deny requests to reverse the connection using extended TURN.
Deny all expansion requests.
Deny requests for verbose mode.
Deny all verification requests.
Insert special headers in mail messages advising recipients that the message may not be authentic.
Set all of the previous arguments (except public).
Don't return message body with a delivery status notification.
Turn off delivery status notification on success.
Deny untrusted users access to aliases, forwards, or include files. Restrict sendmail -bv and disallow -v.
Allow only users of the same group as the owner of the queue directory to examine the mail queue.
Limit queue processing to root and the owner of the queue directory.
Select the directory in which to queue messages.
Multiplier (factor) for high-load queuing. Default is 600000.
Queue messages when load level is higher than load.
Set the timeout on undelivered messages in the queue to the specified time (overridden by Timeout.queuereturn).
Penalize large recipient lists by factor.
Refuse SMTP connections when load is higher than load.
Use DNS lookups and tune them. Queue messages on connection refused. The arg arguments are identical to resolver flags without the RES_ prefix. Each flag can be preceded by a plus or minus sign to enable or disable the corresponding nameserver option. There must be whitespace between the I and the first flag.
Increment priority of items remaining in queue by inc after each job is processed. sendmail uses 90,000 by default.
Save Unix-style From lines at the front of messages.
Use MIME format for error messages.
Format all incoming messages in seven bits.
Save statistics in the named file.
Always instantiate the queue file, even when it is not strictly necessary.
Set default file permissions for temporary files. If this option is missing, default permissions are 0600.
Return undelivered mail that has been in the queue longer than the specified timeout. The default is 5d (five days).
Set name of the time zone.
Do not ignore Errors-To header.
Consult the user database for forwarding information.
Run in verbose mode.
sendmail support files
Traditional location of sendmail binary.
Link to /usr/lib/sendmail; rebuilds the alias database from information in /etc/aliases.
Prints a listing of the mail queue.
Configuration file, in text form.
Configuration file used for local message submissions.
SMTP help file.
Alias file, in text form.
Alias file in dbm format. Created by newaliases
Directory in which the mail queue and temporary files reside.