GNU Mailutils |
|
General-Purpose Mail Package |
Official GNU Software |
The mailutils pop
command invokes an interactive POP3 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).
The mailutils pop
commands form two major groups. POP3 protocol
commands interact with the remote POP3 server and display responses
obtained from it. These commands are named after their POP3
equivalents. Another group, internal commands, are used to
configure the shell itself.
Open connection to hostname. If the -tls option is given, TLS encryption (also known as POPS protocol) will be used. If port argument is not given, the command uses port 110 for a plain POP connection or 995 for POPS (if -tls is given).
Start TLS negotiation. This command is valid only after successful
unencrypted connection has been initiated (using connect
without -tls argument).
Send user name to the server. The pass
command must follow.
Send password. This command is valid only after user
. If
the password argument is omitted, the shell will ask you to
enter it. While entering, both echoing and history recording will be
disabled. Use this to avoid compromising your password.
Authenticate with APOP. If the password argument is omitted, you will be asked to supply it. While entering, both echoing and history recording will be disabled.
List server capabilities. Any number of arguments is accepted. If given, the shell will display only the named capabilities, otherwise it displays entire list. By default capa
reuses the response of its previous invocation (if there was any), instead of resending the ‘CAPA’ command to the server. To force it do so, use the -reread option.
Send a ‘NOOP’ (no operation) command to the server.
Get the mailbox size and number of messages in it.
Shows unique message identifiers. Without arguments, shows identifiers for each message in the mailbox. If number is given, the command returns the UIDL of that particular message only.
Lists messages. See above for the meaning of number. Each line
of the produced listing contains describes a single message and
contains at least the message number and size in bytes. Depending on
the POP3 server implementation, additional fields may be present. For
example, Mailutils pop3d
can also output number of lines in
the message in the additional third field.
Retrieve a message.
Display message headers and first number (default 5) of lines of its body.
Mark message for deletion.
Remove deletion marks.
Quit pop3 session.
Close existing connection.
Control output verbosity. Without arguments the verbose
command shows current settings.
The argument ‘off’ (the default) turns off all additional output. The ‘verbose on’ command enables POP3 protocol tracing output. Additional arguments can be used to provide more verbosity. The ‘secure’ argument enables display of user passwords in the trace output and the ‘payload’ argument enables showing payload data (e.g. response body sent in the reply to ‘RETR’ command, etc.) Thus, the full diagnostics output is obtained by
verbose on secure payload
The ‘mask’ and ‘unmask’ arguments allow to disable and enable such additional verbosity. For example, supposing the command above is in action, the following command will suppress the display of user passwords in the traces:
verbose mask secure
Similarly, verbose unmask secure
will turn it back again.
Set command prompt. The argument can contain variable references in any of the following forms:
$name ${name}
where name is the variable name. Such references are expanded to the actual value of the variable at the time of expansion. The following variables are defined:
Variable | Expansion |
---|---|
user | Login name of the authenticated POP3 user. If the session is not authenticated yet, expands to ‘[nouser]’. |
host | Name of the remote host, or ‘[nohost]’ if no connection is established. |
program-name | Name of the program, as typed on the command line to invoke it. |
canonical-program-name | ‘mailutils’ |
package | ‘Mailutils’ |
version | Mailutils version number (3.14) |
status | Session status. One of: ‘disconnected’, ‘connected’ or ‘logged in’. |
For example:
prompt "[${user}@$host "
Notice the use of quotes to include the space character in the prompt.
Exit the program.
Without arguments displays a list of commands with possible arguments and short descriptions.
With one argument, displays a terse description for the given command.
Shows command history.
This document was generated on January 2, 2022 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.