The Postfix
sendmail(1) command implements the Postfix to Sendmail compatibility interface. For the sake of compatibility with existing applications, some Sendmail command-line options are recognized but silently ignored. By default, Postfix sendmail(1) reads a message from standard input until EOF or until it reads a line with only a . character, and arranges for delivery. Postfix sendmail(1) relies on the postdrop(1) command to create a queue file in the maildrop directory. Specific command aliases are provided for other common modes of operation:mailq
List the mail queue. Each entry shows the queue file ID, message size, arrival time, sender, and the recipients that still need to be delivered. If mail could not be delivered upon the last attempt, the reason for failure is shown. The queue ID string is followed by an optional status character:
*
The message is in the active queue, i.e. the message is selected for delivery.
!
The message is in the hold queue, i.e. no further delivery attempt will be made until the mail is taken off hold.
This mode of operation is implemented by executing the postqueue(1) command.
newaliases
Initialize the alias database. If no input file is specified (with the
-oA option, see below), the program processes the file(s) specified with the alias_database configuration parameter. If no alias database type is specified, the program uses the type specified with the default_database_type configuration parameter. This mode of operation is implemented by running the postalias(1) command.
Note: it may take a minute or so before an alias database update becomes visible. Use the "
postfix reload" command to eliminate this delay.
These and other features can be selected by specifying the appropriate combination of command-line options. Some features are controlled by parameters in the main.cf configuration file. The following options are recognized:
-Ac (ignored)
Postfix sendmail uses the same configuration file regardless of whether or not a message is an initial submission.
-B body_type
The message body MIME type: 7BIT or 8BITMIME.
-bd
Go into daemon mode. This mode of operation is implemented by executing the " postfix start" command.
-bH (ignored)
Postfix has no persistent host status database.
-bi
Initialize alias database. See the newaliases command above.
-bm
Read mail from standard input and arrange for delivery. This is the default mode of operation.
-bp
List the mail queue. See the mailq command above.
-bs
Stand-alone SMTP server mode. Read SMTP commands from standard input, and write responses to standard output. In stand-alone SMTP server mode, mail relaying and other access controls are disabled by default. To enable them, run the process as the
mail_owner user.
This mode of operation is implemented by running the
smtpd(8) daemon.
-bv
Do not collect or deliver a message. Instead, send an email report after verifying each recipient address. This is useful for testing address rewriting and routing configurations.
This feature is available in Postfix version 2.1 and later.
-C config_dir
The path name of the Postfix main.cf file, or of its parent directory. This information is ignored with Postfix versions before 2.3. With all Postfix versions, you can specify a directory pathname with the MAIL_CONFIG environment variable to override the location of configuration files.
-F full_name
Set the sender full name. This overrides the NAME environment variable, and is used only with messages that have no From: message header.
-f sender
Set the envelope sender address. This is the address where delivery problems are sent to. With Postfix versions before 2.1, the Errors-To: message header overrides the error return address.
-G
Gateway (relay) submission, as opposed to initial user submission. Either do not rewrite addresses at all, or update incomplete addresses with the domain information specified with remote_header_rewrite_domain. This option is ignored before Postfix version 2.3.
-h hop_count (ignored)
Hop count limit. Use the hopcount_limit configuration parameter instead.
-I
Initialize alias database. See the newaliases command above.
-i
When reading a message from standard input, dońt treat a line with only a . character as the end of input.
-L label (ignored)
The logging label. Use the syslog_name configuration parameter instead.
-m (ignored)
Backwards compatibility.
-N dsn (default: 'delay, failure')
Delivery status notification control. Specify either a comma-separated list with one or more of failure (send notification when delivery fails), delay (send notification when delivery is delayed), or success (send notification when the message is delivered); or specify never (don't send any notifications at all). This feature is available in Postfix 2.3 and later.
-n (ignored)
Backwards compatibility.
-oAalias_database
Non-default alias database. Specify pathname or type:pathname. See postalias(1) for details.
-O option=value (ignored)
Backwards compatibility.
-o8 (ignored)
To send 8-bit or binary content, use an appropriate MIME encapsulation and specify the appropriate -B command-line option.
-oi
When reading a message from standard input, dońt treat a line with only a . character as the end of input.
-om (ignored)
The sender is never eliminated from alias etc. expansions.
-o x value (ignored)
Set option x to value. Use the equivalent configuration parameter in main.cf instead.
-r sender
Set the envelope sender address. This is the address where delivery problems are sent to. With Postfix versions before 2.1, the Errors-To: message header overrides the error return address.
-R return_limit (ignored)
Limit the size of bounced mail. Use the bounce_size_limit configuration parameter instead.
-q
Attempt to deliver all queued mail. This is implemented by executing the postqueue(1) command. Warning: flushing undeliverable mail frequently will result in poor delivery performance of all other mail.
-qinterval (ignored)
The interval between queue runs. Use the queue_run_delay configuration parameter instead.
-qIqueueid
Schedule immediate delivery of mail with the specified queue ID. This option is implemented by executing the postqueue(1) command, and is available with Postfix version 2.4 and later.
-qRsite
Schedule immediate delivery of all mail that is queued for the named site. This option accepts only site names that are eligible for the "fast flush" service, and is implemented by executing the postqueue(1) command. See flush(8) for more information about the "fast flush" service.
-qSsite
This command is not implemented. Use the slower "sendmail -q" command instead.
-t
Extract recipients from message headers. These are added to any recipients specified on the command line. With Postfix versions prior to 2.1, this option requires that no recipient addresses are specified on the command line.
-U (ignored)
Initial user submission.
-V envid
Specify the envelope ID for notification by servers that support DSN. This feature is available in Postfix 2.3 and later.
-XV (Postfix 2.2 and earlier: -V)
Variable Envelope Return Path. Given an envelope sender address of the form
owner-listname@origin, each recipient user@domain receives mail with a personalized envelope sender address.
By default, the personalized envelope sender address is
owner-listname+user=domain@origin. The default + and = characters are configurable with the default_verp_delimiters configuration parameter.
-XVxy (Postfix 2.2 and earlier: -Vxy)
As -XV, but uses x and y as the VERP delimiter characters, instead of the characters specified with the default_verp_delimiters configuration parameter.
-v
Send an email report of the first delivery attempt (Postfix versions 2.1 and later). Mail delivery always happens in the background. When multiple -v options are given, enable verbose logging for debugging purposes.
-X log_file (ignored)
Log mailer traffic. Use the debug_peer_list and debug_peer_level configuration parameters instead.