Linux and Unix sendmail command
Quick links
About sendmail
Syntax
Related commands
Linux and
Unix main page
First appeared in BSD 4.2, sendmail is a Mail Transfer Agent that accepts and delivers e-mail to local mailboxes.
sendmail [-ba] [-bD] [-bd] [-bi] [-bm] [-bp] [-bs] [-bt] [-bv] [-B Type] [-C file] [-d X] [-F fullname] [-f name] [-h N] [-M xvalue] [-Nnotifications] [-n] [-Ooption=value] [-o xvalue] [-p protocol] [-q [ time ]] [-q Xstring] [-R ret] [-r name] [-t] [-V envid] [-v] [-X logfile] [address]
| -ba | Go into ARPANET mode. All input lines must end with a RETURN-LINEFEED, and all messages will be generated with a RETURN-LINEFEED at the end. Also, the From: and Sender: fields are examined for the name of the sender. |
| -bD | Run as a daemon in the foreground, waiting for incoming SMTP connections. |
| -bd | Run as a daemon in the background, waiting for incoming SMTP connections. |
| -bi | Initialize the aliases database. Root must own and have exclusive write permission to the /etc/mail/aliases* files for successful use of this option. |
| -bm | Deliver mail in the usual way (default). |
| -bp | Print a summary of the mail queue. |
| -bs | Use the SMTP protocol as described in RFC 821. This flag implies all the operations of the -ba flag that are compatible with SMTP. |
| -bt | Run in address test mode. This mode reads addresses and shows the steps in parsing; it is used for debugging configuration tables. |
| -bv | Verify names only; do not try to collect or deliver a message. Verify mode is normally used for validating users or mailing lists. |
| -B Type | Indicate body type (7BIT or 8BITMIME). |
| -C file | Use alternate configuration file. |
| -d X | Set debugging value to X. |
| -F fullname | Set the full name of the sender. |
| -f name | Sets the name of the "from" person (that is, the sender of the mail). |
| -h N | Set the hop count to N. The hop count is incremented every time the mail is processed. When it reaches a limit, the mail is returned with an error message, the victim of an aliasing loop. |
| -M xvalue | Set macro x to the specified value. |
| -Nnotifications | Tag all addresses being sent as wanting the indicated notifications, which consists of the word "NEVER" or a comma-separated list of "SUCCESS", "FAILURE", and "DELAY" for successful delivery, failure and a message that is stuck in a queue somewhere. The default is "FAILURE,DELAY". |
| -n | Do not do aliasing. |
| -Ooptions=value | Set option to the specified value (for long from names). Processing Options are described below. |
| -o xvalue | Set option x to the specified value. Processing Options are described below. |
| -p protocol | Set the sending protocol. The protocol field can be in form protocol:host to set both the sending protocol and the sending host. For example: -pUUCP:uunet sets the sending protocol to UUCP and the sending host to uunet. (Some existing programs use -oM to set the r and s macros; this is equivalent to using -p). |
| -q [time] | Process saved messages in the queue at given intervals. If time is omitted, process the queue once. time is given as a tagged number, with s being seconds, m being minutes, h being hours, d being days, and w being weeks. For example, -q1h30m or -q90m would both set the timeout to one hour thirty minutes. |
| -q Xstring | Run the queue once, limiting the jobs to those matching Xstring. The key letter X can be:
I to limit based on queue identifier. A particular queued job is accepted if one of the corresponding addresses contains the indicated string. |
| -R ret | Identify the information you want returned if the message bounces; ret can be "HDRS" for headers only or "FULL" for headers plus body. |
| -r name | An alternate and obsolete form of the -f flag. |
| -t | Read message for recipients. To:, Cc:, and Bcc: lines will be scanned for people to send to. The Bcc: line will be deleted before transmission. Any addresses in the argument list will be suppressed. The NoRecipientAction Processing Option can be used to change the behavior when no legal recipients are included in the message. |
| -V envid | The indicated envid is passed with the envelope of the message and returned if the message bounces. |
| -v | Go into verbose mode. Alias expansions will be announced, and so forth. |
| -X logfile | Log all traffic in and out of sendmail in the indicated logfile for debugging mailer problems. This produces a lot of data very quickly and should be used sparingly. |
| address | The address of the e-mail that you wish to send. |
