General-Purpose Mail Package
|Official GNU Software|
mailutils imap command invokes an interactive IMAP4 client
shell. It reads commands from the standard input, executes them and
displays the results on the standard output. The shell is similar to
mailutils pop (see mailutils pop) shell.
Most commands in this group correspond (with minor differences) to IMAP commands described in RFC 35015.
Opens connection to the server host. If the -tls option is given, TLS encryption (also known as IMAPS protocol) will be used. If port argument is not supplied, the command uses port 143 for a plain IMAP connection or 993 for IMAPS (if -tls is given).
Lists server capabilities. Any number of names is accepted. If
at least one is given, the shell will display only the named
capabilities, otherwise it displays the entire list. By default,
capability reuses the response of its previous invocation
(if there was any), instead of resending the CAPABILITY command to the
server. To force it do so, use the -reread option.
Starts TLS negotiation. This command is valid only after unencrypted connection has been successfully initiated using connect without the -tls option.
Logs in to the server as user with optional password. If the pass 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.
Quits the imap session.
Sends IMAP ID command. See RFC 29716, for a discussion of arguments. By default, this command outputs entire ID list. If, however, the -test option is given, it will check whether the keyword kw is defined and display its value if so.
Requests a server checkpoint.
Selects the named mailbox. Without argument, selects ‘INBOX’.
Examines the named mailbox, i.e. selects it in read-only mode. If mbox is not given, ‘INBOX’ is assumed.
Gets mailbox status. Valid keywords (kw arguments) are: ‘MESSAGES’, ‘RECENT’, ‘UIDNEXT’, ‘UIDVALIDITY’, and ‘UNSEEN’. Keywords are case-insensitive.
Fetches message data. See RFC 3501, section 6.4.57, for a discussion of its arguments.
Alters mailbox data. See RFC 3501, section 6.4.68, for a discussion of its arguments.
Closes the currently selected mailbox (with expunge).
Closes the currently selected mailbox (without expunge).
Deletes the mailbox mbox.
Renames existing mailbox old-name to new-name.
Permanently removes messages marked for deletion.
Creates new mailbox with the given name.
Reads an RFC-822 message from file and appends it to the mailbox. Use the -time option to supply envelope date for the message. Use the -flag option to supply message flags. For example:
append -time "25-Aug-2002 18:00:00 +0200" -flag \Seen INBOX input.msg
Lists matching mailboxes. See RFC 3501, section 6.3.89, for a discussion of its arguments.
Lists subscribed mailboxes (RFC 3501, section 6.3.910).
Subscribes to a mailbox.
Removes mailbox mbox from the subscription list.
Sends a no operation command.
Closes existing connection.
imap shell implements the same set of internal commands as
pop shell: See Internal commands. There is
only one imap-specific internal command:
Controls the UID mode. When the UID mode is on, the commands
store operate on and return message UIDs
instead of their sequence numbers.
To examine the current state of the UID mode, issue the
command without arguments.
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.