GNU Mailutils Manual (split by node):   Section:   Chapter:FastBack: Programs   Up: mailutils   FastForward: Libraries   Contents: Table of ContentsIndex: Function Index

3.17.17 mailutils smtp

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).

Initializing connection

smtp command: connect [-tls] host [port]

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.

Connection parameters

A number of parameters is associated with an open connection:

domain

Domain name used in EHLO statement. Defaults to the current host name.

The following parameters are used for ESMTP authentication:

username

User name.

password

User password.

service

GSASL service name.

realm

Realm name.

host

Host name.

url

SMTP URL. It can contain all of the above. Default is smtp://

These parameters are manipulated using the following statements:

smtp command: set param value [param value...]

Sets parameter param to value. Several parameters can be set with one set statement.

smtp command: clear [param...]

Unset the supplied connection parameters. If used without arguments, unsets all parameters.

smtp command: list [param...]

Lists the values of the connection parameters. If used without arguments, lists all parameters.

SMTP commands

smtp command: ehlo [domain]

Sends the ESMTP greeting. Unless domain is supplied, the connection parameter ‘domain’ is used.

smtp command: capa [name...]

Lists the server capabilities.

smtp command: starttls

Initiates encrypted connection. This command is disabled if the connection is opened with the -tls option.

smtp command: auth mech [mech...]

Authenticate using the supplied mechanisms.

smtp command: rset

Reset the session state.

smtp command: from [email]

Sets sender email address. If used without arguments, prints the sender email address.

smtp command: to [email]

Sets recipient email address. If used without arguments, prints all recepient names collected so far.

smtp command: smtp command [args...]

Sends the command with its arguments verbatim.

smtp command: quit

Quits the SMTP session.

smtp command: send [file]

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

Internal commands are the same as in pop shell: See Internal commands.

GNU Mailutils Manual (split by node):   Section:   Chapter:FastBack: Programs   Up: mailutils   FastForward: Libraries   Contents: Table of ContentsIndex: Function Index