table of contents
mailutil(1) | General Commands Manual | mailutil(1) |
NAME¶
mailutil - mail utility programSYNTAX¶
mailutil command [switches] [arguments] All commands accept the -d, -v, and -u switches in addition to any command-specific switches. mailutil check [MAILBOX] mailutil create MAILBOX mailutil delete MAILBOX mailutil rename SOURCE DESTINATION mailutil copy [-rw] [-kw] [-ig] SOURCE DESTINATION mailutil move [-rw] [-kw] [-ig] SOURCE DESTINATION mailutil append [-rw] [-kw] [-ig] SOURCE DESTINATION mailutil appenddelete [-rw] [-kw] [-ig] SOURCE DESTINATION mailutil prune MAILBOX CRITERIA mailutil transfer [-m mode] [-rw] [-kw] [-ig] SOURCE DESTINATIONDESCRIPTION¶
mailutil replaces the old chkmail, imapcopy, imapmove, imapxfer, mbxcopy, mbxcreat, and mbxcvt programs. mailutil check determines whether new mail exists in the given mailbox (the default is INBOX). The number of new messages is defined as the number of messages that have "Recent" status set. If the mailbox contains no new messages, mailutil check will indicate that no new mail is present; otherwise, it will report the number of new messages. In either case, it will also indicate the canonical form of the name of the mailbox. mailutil create creates a new mailbox with the given name. The mailbox name must not already exist. A mailbox can be created in a particular format by prefixing the name with #driver. followed by the format name and a / character. For example, the commandmailutil create #driver.mbx/junkmail
mailutil copy INBOX #driver.mbx/INBOX
mailutil prune INBOX "before 1-jan-2004"
mailutil transfer foo bar
mailutil transfer "{imap.foo.com}" "{imap.bar.com}old/"
FLAGS¶
The -d or -debug flag prints full debugging telemetry including protocol operations. The -v or -verbose flag prints verbose (non-error) telemetry. The -u USERID or -user USERID switch attempts to become the indicated user. This is for the benefit of system administrators who want to do mailutil operations on a userid that does not normally have shell access. The -rw or -rwcopy flag causes the source mailbox to be open in readwrite mode rather than readonly mode. Normally, mailutil tries to use readonly mode to avoid altering any flags in the source mailbox, but some mailbox types, e.g. POP3, can't be open in readonly mode. The -kw or -kwcopy flag causes the keywords of the source mailbox to be created in the destination mailbox. Normally, mailutil does not create keywords in the destination mailbox so only those keywords that are already defined in the destination mailbox will be preserved. Note that some IMAP servers may automatically create keywords, so this flag may not be necessary. The -ig or -ignore flag causes the keywords of the source mailbox to be ignored completely and no attempt is made to copy them to the destination mailbox. The -ig[nore] and -kw[copy] flags are mutually exclusive.ARGUMENTS¶
The arguments are standard c-client mailbox names. A variety of mailbox name formats and types of mailboxes are supported by c-client; examples of the most common forms of names are:- Name
- Meaning
- INBOX
- primary incoming mail folder on the local system
- archive/tx-project
- mail folder named "tx-project" in "archive" subdirectory of local filesystem home directory
- {imapserver.foo.com}INBOX
- primary incoming mail folder on IMAP server system "imapserver.foo.com"
- {imapserver.foo.com}archive/tx-project
- mail folder named "tx-project" in "archive" subdirectory on IMAP server system "imapserver.foo.com"
- #news.comp.mail.misc
- newsgroup "comp.mail.misc" on local filesystem
- {newserver.foo.com/nntp}comp.mail.misc
- newsgroup "comp.mail.misc" on NNTP server system "newserver.foo.com"
- {popserver.foo.com/pop3}
- mail folder on POP3 server system "popserver.foo.com"
RESTRICTIONS¶
You must surround a {host}mailbox argument with quotation marks if you run mailutil from csh(1) or another shell for which braces have special meaning. You must surround a #driver.format/mailbox argument with quotation marks if you run mailutil from a shell in which "#" is the comment character.AUTHOR¶
Mark Crispin, MRC@Washington.EDUMarch 3, 2008 |