Usage:
Sendmail mode (default):
msmtp [option...] [--] recipient...
msmtp [option...] -t [--] [recipient...]
Read a mail from standard input and transmit it to an SMTP or LMTP server.
Configuration mode:
msmtp --configure=mailadress
Generate and print configuration for address.
Server information mode:
msmtp [option...] --serverinfo
Print information about a server.
Remote Message Queue Starting mode:
msmtp [option...] --rmqs=host|@domain|#queue
Send a Remote Message Queue Starting request to a server.
General options:
--version print version
--help print help
-P, --pretend print configuration info and exit
-d, --debug print debugging information
Changing the mode of operation:
--configure=mailaddress generate and print configuration for address
-S, --serverinfo print information about the server
--rmqs=host|@domain|#queue send a Remote Message Queue Starting request
Configuration options:
-C, --file=filename set configuration file
-a, --account=id use the given account instead of the account
named "default"; its settings may be changed
with command-line options
--host=hostname set the server, use only command-line settings;
do not use any configuration file data
--port=number set port number
--source-ip=[IP] set/unset source ip address to bind the socket to
--proxy-host=[IP|hostname] set/unset proxy
--proxy-port=[number] set/unset proxy port
--socket=[socketname] set/unset local socket to connect to
--timeout=(off|seconds) set/unset network timeout in seconds
--protocol=(smtp|lmtp) use the given sub protocol
--domain=string set the argument of EHLO or LHLO command
--auth[=(on|off|method)] enable/disable authentication and optionally
choose the method
--user=[username] set/unset user name for authentication
--passwordeval=[eval] evaluate password for authentication
--tls[=(on|off)] enable/disable TLS encryption
--tls-starttls[=(on|off)] enable/disable STARTTLS for TLS
--tls-trust-file=[file] set/unset trust file for TLS
--tls-crl-file=[file] set/unset revocation file for TLS
--tls-fingerprint=[f] set/unset trusted certificate fingerprint for TLS
--tls-certcheck[=(on|off)] enable/disable server certificate checks for TLS
--tls-key-file=[file] set/unset private key file for TLS
--tls-cert-file=[file] set/unset private cert file for TLS
--tls-priorities=[prios] set/unset TLS priorities.
--tls-host-override=[host] set/unset override for TLS host verification.
--tls-min-dh-prime-bits=[b] set/unset minimum bit size of DH prime
Options specific to sendmail mode:
--auto-from[=(on|off)] enable/disable automatic envelope-from addresses
-f, --from=address set envelope from address
--maildomain=[domain] set the domain for automatic envelope from
addresses
-N, --dsn-notify=(off|cond) set/unset DSN conditions
-R, --dsn-return=(off|ret) set/unset DSN amount
-X, --logfile=[file] set/unset log file
--logfile-time-format=[fmt] set/unset log file time format for strftime()
--syslog[=(on|off|facility)] enable/disable/configure syslog logging
-t, --read-recipients read additional recipients from the mail
--read-envelope-from read envelope from address from the mail
--aliases=[file] set/unset aliases file
--set-from-header[=(auto|on|off)] set From header handling
--set-date-header[=(auto|off)] set Date header handling
--set-msgid-header[=(auto|off)] set Message-ID header handling
--set-to-header[=(on|off|undisclosed_recipients)] set To header handling
--remove-bcc-headers[=(on|off)] enable/disable removal of Bcc headers
-- end of options
Accepted but ignored: -A, -B, -bm, -G, -h, -i, -L, -m, -n, -O, -o
Report bugs to <marlam@marlam.de>.
Options (43)
| Option | Description | Source |
|---|---|---|
--version | Print version information, including information about the libraries used. | help + man |
--help | Print help. | help + man |
-P, --pretend | Print the configuration settings that would be used, but do not take further action. | help + man |
-d, --debug, -v | Print lots of debugging information, including the whole conversation with the SMTP server. | help + man |
--configure mailaddress | Generate a configuration for the given mail address and print it. | help + man |
-S, --serverinfo | Print information about the SMTP server and exit. | help + man |
--rmqs host|@domain|#queue | Send a Remote Message Queue Starting request for the given host, domain, or queue to the SMTP server and exit. | help + man |
-C, --file filename | Use the given file instead of ~/.msmtprc or $XDG_CONFIG_HOME/msmtp/config as the user configuration file. | help + man |
-a, --account id | use the given account instead of the account named "default"; | help + man |
--host hostname | Use this SMTP server with settings from the command line; | help + man |
--port number | Set the port number to connect to. | help + man |
--source-ip IP | set/unset source ip address to bind the socket to | help |
--proxy-host IP|hostname | set/unset proxy | help |
--proxy-port number | set/unset proxy port | help |
--socket socketname | set/unset local socket to connect to | help |
--timeout (off|seconds) | Set or unset a network timeout, in seconds. | help + man |
--protocol (smtp|lmtp) | use the given sub protocol | help + man |
--domain string | set the argument of EHLO or LHLO command | help |
--auth (on|off|method) | enable/disable authentication and optionally choose the method | help |
--user username | set/unset user name for authentication | help |
--passwordeval eval | evaluate password for authentication | help |
--tls (on|off) | enable/disable TLS encryption | help |
--tls-starttls (on|off) | enable/disable STARTTLS for TLS | help |
--tls-trust-file file | set/unset trust file for TLS | help |
--tls-crl-file file | set/unset revocation file for TLS | help |
--tls-fingerprint f | set/unset trusted certificate fingerprint for TLS | help |
--tls-certcheck (on|off) | enable/disable server certificate checks for TLS | help |
--tls-key-file file | set/unset private key file for TLS | help |
--tls-cert-file file | set/unset private cert file for TLS | help |
--tls-priorities prios | set/unset TLS priorities. | help |
--tls-host-override host | set/unset override for TLS host verification. | help |
--tls-min-dh-prime-bits b | set/unset minimum bit size of DH prime | help |
--auto-from (on|off) | enable/disable automatic envelope-from addresses | help |
-f, --from address | Set the envelope-from address. | help + man |
--maildomain domain | set the domain for automatic envelope from addresses | help |
-N, --dsn-notify (off|cond) | Set or unset DSN notification conditions. | help + man |
-R, --dsn-return (off|ret) | Set or unset the DSN notification amount. | help + man |
-X, --logfile file | set/unset log file | help |
--logfile-time-format fmt | set/unset log file time format for strftime() | help |
-t, --read-recipients | Read recipient addresses from the To, Cc, and Bcc headers of the mail in addition to the recipients given on the command line. | help + man |
--read-envelope-from | Read the envelope from address from the From header of the mail, or from Resent-From if such a header is present and appears before any From header. | help + man |
--aliases file | set/unset aliases file | help |
-Fname | Set a full name to be used in a From header if msmtp adds one. (in the manual page but not in --help) | man |