1        Cone©
2
3MAILTOOL(1)             Cone: COnsole Newsreader And E             MAILTOOL(1)
4
5
6

NAME

8       mailtool - Process mailboxes
9

SYNOPSIS

11       mailtool [options...]
12

USAGE

14       mailtool is a diagnostic utility for handling various operations on
15       mailboxes.  mailtool's main uses include: display the list of folders
16       in a mailbox; displaying list of messages in a mailbox; and copying
17       mailboxes.
18
19       The following mailboxes can be accessed by mailtool:
20
21       imap://userid@server[/options]
22           An IMAP account.  mailtool will prompt for the login password.
23
24       imaps://userid@server[/options]
25           An IMAP account accessed via an encrypted SSL connection.
26
27       pop3://userid@server[/options]
28           A POP3 account.  mailtool will prompt for the login password.
29
30       pop3s://userid@server[/options]
31           A POP3 account accessed via an encrypted SSL connection.
32
33       maildir:path
34           A local maildir mailbox.  path specifies the maildir's location
35           relative to the home directory (NOT the current directory).
36
37       mbox:path
38           Local mbox mail folders.  path specifies the path to an mbox folder
39           file, or a directory containing mbox folders, relative to the home
40           directory (NOT the current directory).
41
42       inbox:path
43           Local mbox mail folders, like “mbox:path”; additionally, the system
44           spool mailbox is automatically copied to $HOME/Inbox, which is
45           accessible as folder INBOX.
46
47       The name of a remote IMAP or POP3 server may be followed by one or more
48       options that control various settings of the IMAP or POP3 connection:
49
50       /cram
51           Do not open the account unless the server supports secure password
52           authentication. Secure password authentication verifies the
53           account's password using a challenge/response authentication
54           mechanism (where the label "cram" comes from). The actual password
55           is never actually transmitted to the server, and therefore cannot
56           be intercepted while in transit over an untrusted network.
57
58           Secure password authentication is not supported by all servers.
59           This option may not work with some servers. This option does not
60           enable secure password authentication, it only mandates its use. If
61           the server supports secure password authentication, it will be used
62           even without the /cram option. Traditional userid/password
63           authentication will be used only if the server does not implement
64           secure password authentication. The /cram option makes secure
65           password authentication mandatory.
66
67           The /cram option is marginally useful even with encrypted server
68           connections. The secure password authentication never sends the
69           explicit password to the server. Encryption makes it theoretically
70           impossible to recover the password from an encrypted data
71           connection; but with secure authentication the password is never
72           sent over the connection in the first place (the password's
73           validity is certified by exchanging certain mathematical
74           calculations between the server and the client). If the server is
75           compromised, the compromised server will not receive the account
76           password (unless the password is recovered from the server in other
77           ways).
78
79       /imap
80           Do not use the SMAP if the server claims the availability of this
81           experimental mail access protocol, and fall back to IMAP
82           compatibility mode (this option is meaningful only with “imap://”
83           and “imaps://” URLs).
84
85       /notls
86           Do not upgrade a plain connection to an encrypted one. This option
87           is primarily used for testing and debugging purposes. Sometimes
88           this option might be useful with servers that claim to offer
89           encryption, but are unable to do so when taken up on their offer.
90
91       /novalidate-cert
92           Do not validate the server's SSL certificate when using an
93           encrypted connection. Normally the mail server's SSL certificate
94           must be validate when using an encrypted connection. The
95           certificate's name must match the server's name, and the
96           certificate must be signed by a trusted certificate authority.
97
98           The encrypted connection normally fails if the certificate cannot
99           be validate. Validation requires that a list of trusted certificate
100           authorities must be known and configured. It's simply impossible to
101           know which certificate authorities are valid without an explicit
102           list of valid, known, trusted, certificate authorities. If a
103           trusted authority list is not configured, no certificate can be
104           validated. If the server's certificate is a self-signed certificate
105           (this is often used for testing purposes), or if it's not signed by
106           a known authority, the encrypted connection fails.
107
108           This /novalidate-cert option disables certificate validation. The
109           encrypted connection will be established even if the server's
110           certificate would otherwise be rejected.
111
112               Note
113               This option is applicable even when an encrypted IMAP or POP3
114               connection is not explicitly requested. Many mail servers are
115               capable of automatically upgrading unencrypted connections to a
116               fully-encrypted connection. If a mail server claims to be able
117               to use encryption, then there's no reason not to use it. The
118               result is that all encryption certification requirements still
119               apply even when encryption is not explicitly requested.
120
121   Displaying mailbox contents
122       mailtool -tree | -list  account
123
124       -tree shows a hierarchical representation of mail folders in account.
125       -list generates a simple folder listing, one folder name per line.
126       -tree shows folder names, while -list shows the actual mail folder path
127       in account.
128
129           mailtool -tree imap://jsmith@mail.example.com/novalidate-cert/cram
130
131   Creating folders
132       mailtool -create | -createdir  folder name account
133
134       -create creates a new subfolder of folder in account. The new
135       subfolder's name is name.  -createdir creates a new folder directory (a
136       folder that contains other folders).
137
138           mailtool -create INBOX.lists announcements maildir:Maildir
139
140       This command creates a new folder “announcements” as a subfolders of
141       “INBOX.lists” in the local maildir.
142
143   Deleting folders
144       mailtool -delete | -deletedir  folder account
145
146       -delete deletes an existing folder in account.
147
148       -deletedir deletes a folder directory.
149
150           mailtool -delete INBOX.lists.announcements maildir:Maildir
151
152   Renaming folders
153       mailtool -rename oldfolder folder name account
154
155       -renames renames an existing oldfolder. The folder is renamed as name,
156       as a subfolder of folder.  folder may be an empty string if the folder
157       should be moved to the top level of account's folder hierarchy.
158
159           mailtool -rename INBOX.lists.announcements INBOX.lists Announcements maildir:Maildir
160
161       The folder “INBOX.lists.announcements” is renamed to
162       “INBOX.lists.Announcements”. This slightly unusual way to rename folder
163       allows folders to be relocated in the mail account's folder hierarchy.
164
165   Reading folder's index
166       mailtool -index folder account
167
168       -index downloads and prints a summary of all messages in folder, in
169       account. The summary shows the sender's and recipients' address, the
170       message's subject, and size.
171
172           mailtool -index INBOX imap://john@mail.example.com/novalidate-cert
173
174   Removing a message from a folder
175       mailtool -remove folder n account
176
177       -remove removes message #n (ranging from 1 to the number of messages in
178       the folder) in folder, in account. The message numbers may be obtained
179       by using -index.
180
181       n may be a comma-separated list of message numbers, in strictly
182       numerically increasing order.  -remove confirms the list of messages to
183       remove and issues a “Ready:” prompt. Press ENTER to remove the
184       messages.
185
186           mailtool -remove INBOX 28,31 imap://john@mail.example.com/novalidate-cert
187
188   Filtering messages
189       mailtool -filter folder account
190
191       -filter is a combination of -index and -remove.  folder's index is
192       downloaded, and the summary of each message is shown, one message at a
193       time. Each message's summary is followed by a prompt: “Delete, Skip, or
194       Exit”. Pressing D removes the message, S leaves the message unchanged,
195       and E leaves the remaining messages unchanged.
196
197           mailtool -filter INBOX pop3://john@mail.example.com/novalidate-cert
198
199           Note
200           -filter is not meant to be used with large folders. Unless messages
201           are removed quickly, the connection to the server may be
202           disconnected for inactivity.
203
204   Copying folders
205       mailtool [-recurse] -tofolder tofolder -copyto toaccount -fromfolder
206                fromfolder fromaccount
207
208       This command copies an entire folder, fromfolder in fromaccount to a
209       new folder, tofolder (which will be created, if necessary) in
210       toaccount. Optionally, -recurse specifies that all subfolders of
211       fromfolder should also be copied.
212
213
214           mailtool -tofolder INBOX -copyto maildir:Maildir \
215               -fromfolder "INBOX" imap://mbox100@mail.example.com/novalidate-cert
216
217           mailtool -recurse -tofolder INBOX.converted_mail \
218               -copyto maildir:Maildir -fromfolder "mail" \
219                   imap://mbox100@mail.example.com/novalidate-cert
220
221       This example first copies the INBOX on the IMAP server to
222       $HOME/Maildir, then copies subfolders of “mail” on the IMAP server to
223       the “converted_mail” subfolder in the maildir.
224
225           mailtool -tofolder INBOX -copyto maildir:Maildir \
226              -fromfolder "INBOX" inbox:mail
227
228           mailtool -recurse -tofolder INBOX.converted_mail \
229               -copyto maildir:Maildir -fromfolder "" mbox:mail
230
231
232       This example first copies $HOME/Inbox (accessed as the INBOX folder in
233       inbox:mail) to $HOME/Maildir, then copies mbox folders from $HOME/mail
234       to the “converted_mail” subfolder in the maildir.
235
236           Note
237           Mail accounts that contain hybrid folders (folders that contain
238           both messages and subfolders) can only be copied to account types
239           that also support hybrid folders: either local maildirs, or to
240           remote servers that support hybrid folders.
241

SEE ALSO

243       cone(1).
244

AUTHOR

246       Sam Varshavchik
247
248
249
250Cone©                             08/25/2016                       MAILTOOL(1)
Impressum