GNU Mailutils |
|
General-Purpose Mail Package |
Official GNU Software |
The mailutils smtp
command invokes an interactive SMTP client
shell. It reads commands from the standard input, executes them and
displays the results on the standard output. If the standard input is
connected to a terminal, the readline and history facilities are
enabled (provided that Mailutils is configured with GNU Readline).
Connects to SMTP server at host (IP address or host name). If the -tls option is given, TLS encryption (also known as SMTPS protocol) will be used. The default port number is 25 for plain SMTP and 465 for SMTPS. Explicit port argument overrides the default value.
A number of parameters is associated with an open connection:
Domain name used in EHLO statement. Defaults to the current host name.
The following parameters are used for ESMTP authentication:
User name.
User password.
GSASL service name.
Realm name.
Host name.
SMTP URL. It can contain all of the above. Default is smtp://
These parameters are manipulated using the following statements:
Sets parameter param to value. Several parameters can be
set with one set
statement.
Unset the supplied connection parameters. If used without arguments, unsets all parameters.
Lists the values of the connection parameters. If used without arguments, lists all parameters.
Sends the ESMTP greeting. Unless domain is supplied, the connection parameter ‘domain’ is used.
Lists the server capabilities.
Initiates encrypted connection. This command is disabled if the connection is opened with the -tls option.
Authenticate using the supplied mechanisms.
Reset the session state.
Sets sender email address. If used without arguments, prints the sender email address.
Sets recipient email address. If used without arguments, prints all recepient names collected so far.
Sends the command with its arguments verbatim.
Quits the SMTP session.
Reads the message from file and sends it. If file is not
supplied, the action depends on whether a send
command was used
prevously within the same session. If so, mailutils
will
first ask whether to reuse the already supplied message. If not, it
will start an editor, allowing you to enter the new message. When you
exit from the editor, you will be prompted what to do with the
message: send, edit, or quit (discard) it.
Internal commands are the same as in pop
shell: See Internal commands.
This document was generated on January 3, 2025 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.