General-Purpose Mail Package
|Official GNU Software|
Usually, the utility is invoked as:
decodemail inbox outbox
where inbox and outbox are file names or URLs of the input and output mailboxes, correspondingly. The input mailbox is opened read-only and will not be modified in any way. In particular, the status of the processed messages will not change. If the output mailbox does not exist, it will be created. If it exists, the messages will be appended to it, preserving any original messages that are already in it. This behavior can be changed using the -t (--truncate) option, described below.
The two mailboxes can be of different types. For example you can read input from an imap server and store it in local ‘maildir’ box using the following command:
decodemail imap://firstname.lastname@example.org maildir:///var/mail/user
Both arguments can be omitted. If outbox is not supplied, the resulting mailbox will be printed on the standard output in Unix ‘mbox’ format. If inbox is not supplied, the utility will open the system inbox for the current user and use it for input.
A consequence of these rules is that there is no simple way to read
the input mailbox from standard input (the input must be seekable).
If you need to do this, the normal procedure would be to save what
would be standard input in a temporary file and then give that file as
The following command line options modify the
Convert all textual parts from their original character set to the specified charset.
Convert all textual parts from their original character set to the
current character set, as specified by the
Do not convert character sets. This is the default.
If the output mailbox exists, truncate it before appending new messages.
Keep the existing messages in the output mailbox intact. This is the default.
Additionally, the Common Options are also understood.
This document was generated on August 5, 2021 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.