comparison man/rmail.texi @ 90072:cb67264d6096

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-2 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-83 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-84 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-3 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-4 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-5 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-6 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-11 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-12 Remove "-face" suffix from lazy-highlight face name * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-13 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-16 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-17 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-18 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-21 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-22 <no summary provided> * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-23 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-39 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-40 Fix regressions from latest reftex update * miles@gnu.org--gnu-2005/gnus--rel--5.10--base-0 tag of miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-82 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-1 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-2 Merge from miles@gnu.org--gnu-2004 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-3 Merge from emacs--cvs-trunk--0
author Miles Bader <miles@gnu.org>
date Sun, 16 Jan 2005 03:40:12 +0000
parents 68c22ea6027c cc895ba38d57
children 29e773288013
comparison
equal deleted inserted replaced
90071:f6b4d0ebf147 90072:cb67264d6096
35 * Coding: Rmail Coding. How Rmail handles decoding character sets. 35 * Coding: Rmail Coding. How Rmail handles decoding character sets.
36 * Editing: Rmail Editing. Editing message text and headers in Rmail. 36 * Editing: Rmail Editing. Editing message text and headers in Rmail.
37 * Digest: Rmail Digest. Extracting the messages from a digest message. 37 * Digest: Rmail Digest. Extracting the messages from a digest message.
38 * Out of Rmail:: Converting an Rmail file to mailbox format. 38 * Out of Rmail:: Converting an Rmail file to mailbox format.
39 * Rot13: Rmail Rot13. Reading messages encoded in the rot13 code. 39 * Rot13: Rmail Rot13. Reading messages encoded in the rot13 code.
40 * Movemail: Movemail. More details of fetching new mail. 40 * Movemail:: More details of fetching new mail.
41 * Remote Mailboxes:: Retrieving Mail from Remote Mailboxes.
42 * Other Mailbox Formats:: Retrieving Mail from Local Mailboxes in
43 Various Formats
41 @end menu 44 @end menu
42 45
43 @node Rmail Basics 46 @node Rmail Basics
44 @section Basic Concepts of Rmail 47 @section Basic Concepts of Rmail
45 48
1150 To view a buffer using the rot13 code, use the command @kbd{M-x 1153 To view a buffer using the rot13 code, use the command @kbd{M-x
1151 rot13-other-window}. This displays the current buffer in another window 1154 rot13-other-window}. This displays the current buffer in another window
1152 which applies the code when displaying the text. 1155 which applies the code when displaying the text.
1153 1156
1154 @node Movemail 1157 @node Movemail
1155 @section @code{movemail} and POP 1158 @section @code{movemail} program
1156 @cindex @code{movemail} program 1159 @cindex @code{movemail} program
1160
1161 When invoked for the first time, Rmail attempts to locate
1162 @code{movemail} program and determine its version. There are
1163 two versions of @code{movemail} program: the native one, shipped with
1164 GNU Emacs (we will refer to it as @samp{emacs version}) and the one
1165 coming from GNU mailutils (@xref{movemail,,,mailutils,GNU mailutils},
1166 we will refer to it as @samp{mailutils version}). Both versions are
1167 compatible with each other in the sense that they support the same
1168 command line syntax and the same basic subset of options. However,
1169 the @samp{mailutils} version offers a much richer set of
1170 features.
1171
1172 The @samp{Emacs version} of @code{movemail} is able to retrieve mail from usual
1173 UNIX mailbox formats and from remote mailboxes using the POP3 protocol.
1174
1175 The @samp{Mailutils version} is able to handle a wide set of mailbox
1176 formats, such as plain UNIX mailboxes, @code{maildir} and @code{MH}
1177 mailboxes, etc. It is able to retrieve remote mail using POP3 or IMAP4
1178 protocol. In the latter case, @code{mailutils movemail} can be
1179 instructed to retrieve mail using a TLS encrypted channel.
1180
1181 The @samp{Mailutils movemail} accepts mailbox argument in the @acronym{URL}
1182 form. The detailed description of mailbox @acronym{URL}s can be found
1183 in @ref{URL,,,mailutils,Mailbox URL Formats}. In short, a
1184 @acronym{URL} is:
1185
1186 @smallexample
1187 @var{proto}://[@var{user}[:@var{password}]@@]@var{host-or-file-name}
1188 @end smallexample
1189
1190 @noindent
1191 where square brackets denote optional elements.
1192
1193 @table @var
1194 @item proto
1195 Specifies the @dfn{mailbox protocol}, or @dfn{format} to
1196 use. The exact semantics of the rest of @acronym{URL} elements depends
1197 on the actual value of @var{proto}.
1198
1199 @item user
1200 User name to access the remote mailbox.
1201
1202 @item password
1203 User password to access the remote mailbox.
1204
1205 @item host-or-file-name
1206 Hostname of the remote server for remote mailboxes or file name of a
1207 local mailbox.
1208 @end table
1209
1210 @var{Proto} can be one of:
1211
1212 @table @asis
1213 @item mbox
1214 Usual UNIX mailbox format. In this case, neither @var{user} nor
1215 @var{pass} are used, and @var{host-or-file-name} denotes the file name of
1216 the mailbox file, e.g., @code{mbox://var/spool/mail/smith}.
1217
1218 @item mh
1219 A local mailbox in the @acronym{MH} format. @var{User} and
1220 @var{pass} are not used. @var{Host-or-file-name} denotes the name of
1221 @acronym{MH} folder, e.g., @code{mh://Mail/inbox}.
1222
1223 @item maildir
1224 A local mailbox in the @acronym{maildir} format. @var{User} and
1225 @var{pass} are not used, and @var{host-or-file-name} denotes the name of
1226 @code{maildir} mailbox, e.g., @code{maildir://mail/inbox}.
1227
1228 @item file
1229 Any local mailbox format. Its actual format is detected automatically
1230 by @code{movemail}.
1231
1232 @item pop
1233 A remote mailbox to be accessed via POP3 protocol. @var{User}
1234 specifies the remote user name to use, @var{pass} may be used to
1235 specify the user password, @var{host-or-file-name} is the name or IP
1236 address of the remote mail server to connect to; e.g.,
1237 @code{pop://smith:guessme@@remote.server.net}.
1238
1239 @item imap
1240 A remote mailbox to be accessed via IMAP4 protocol. @var{User}
1241 specifies the remote user name to use, @var{pass} may be used to
1242 specify the user password, @var{host-or-file-name} is the name or IP
1243 address of the remote mail server to connect to;
1244 e.g., @code{imap://smith:guessme@@remote.server.net}.
1245 @end table
1246
1247 Alternatively, the mailbox may be specified as a file name of the
1248 mailbox to use. This is equivalent to specifying the @samp{file} protocol:
1249
1250 @smallexample
1251 /var/spool/mail/user @equiv{} file://var/spool/mail/user
1252 @end smallexample
1253
1254 @vindex rmail-movemail-program
1255 @vindex rmail-movemail-search-path
1256 To determine which version of @code{movemail} is being used, Rmail
1257 examines the value of @code{rmail-movemail-program} variable. If it
1258 is set, its value is used as a full path to the @code{movemail} binary.
1259 Otherwise, Rmail searches for @code{movemail} in the list of directories
1260 constructed by appending the values of @code{rmail-movemail-search-path} and
1261 @code{exec-path} to @code{exec-directory}.
1262
1263 @node Remote Mailboxes
1264 @section Retrieving Mail from Remote Mailboxes
1265 @pindex movemail
1157 1266
1158 @vindex rmail-preserve-inbox 1267 @vindex rmail-preserve-inbox
1159 When getting new mail, Rmail first copies the new mail from the inbox 1268 When getting new mail, Rmail first copies the new mail from the inbox
1160 file to the Rmail file; then it saves the Rmail file; then it truncates 1269 file to the Rmail file; then it saves the Rmail file; then it truncates
1161 the inbox file. This way, a system crash may cause duplication of mail 1270 the inbox file. This way, a system crash may cause duplication of mail
1173 that file, saves the Rmail file, and only then deletes the intermediate 1282 that file, saves the Rmail file, and only then deletes the intermediate
1174 file. If there is a crash at the wrong time, this file continues to 1283 file. If there is a crash at the wrong time, this file continues to
1175 exist, and Rmail will use it again the next time it gets new mail from 1284 exist, and Rmail will use it again the next time it gets new mail from
1176 that inbox. 1285 that inbox.
1177 1286
1178 @pindex movemail
1179 If Rmail is unable to convert the data in 1287 If Rmail is unable to convert the data in
1180 @file{~/.newmail-@var{inboxname}} into Babyl format, it renames the file 1288 @file{~/.newmail-@var{inboxname}} into Babyl format, it renames the file
1181 to @file{~/RMAILOSE.@var{n}} (@var{n} is an integer chosen to make the 1289 to @file{~/RMAILOSE.@var{n}} (@var{n} is an integer chosen to make the
1182 name unique) so that Rmail will not have trouble with the data again. 1290 name unique) so that Rmail will not have trouble with the data again.
1183 You should look at the file, find whatever message confuses Rmail 1291 You should look at the file, find whatever message confuses Rmail
1184 (probably one that includes the control-underscore character, octal code 1292 (probably one that includes the control-underscore character, octal code
1185 037), and delete it. Then you can use @kbd{1 g} to get new mail from 1293 037), and delete it. Then you can use @kbd{1 g} to get new mail from
1186 the corrected file. 1294 the corrected file.
1187 1295
1188 Some sites use a method called POP for accessing users' inbox data 1296 Some sites use a method called POP for accessing users' inbox data
1189 instead of storing the data in inbox files. @code{movemail} can work 1297 instead of storing the data in inbox files. The @code{Emacs
1190 with POP if you compile it with the macro @code{MAIL_USE_POP} defined. 1298 movemail} can work with POP if you compile it with the macro
1191 (You can achieve that by specifying @samp{--with-pop} when you run 1299 @code{MAIL_USE_POP} defined. (You can achieve that by specifying
1192 @code{configure} during the installation of Emacs.) 1300 @samp{--with-pop} when you run @code{configure} during the
1193 @code{movemail} only works with POP3, not with older 1301 installation of Emacs.)
1302
1303 The @code{Mailutils movemail} by default supports POP, unless configured
1304 with @samp{--disable-pop} option.
1305
1306 Both versions of @code{movemail} only work with POP3, not with older
1194 versions of POP. 1307 versions of POP.
1195 1308
1196 @cindex @env{MAILHOST} environment variable 1309 @cindex @env{MAILHOST} environment variable
1197 @cindex POP inboxes 1310 @cindex POP mailboxes
1198 Assuming you have compiled and installed @code{movemail} 1311 No matter which flavor of @code{movemail} you use, you can specify
1199 appropriately, you can specify a POP inbox by using a ``file name'' of 1312 POP inbox by using POP @dfn{URL} (@pxref{Movemail}). A POP
1200 the form @samp{po:@var{username}}, in the inbox list of an Rmail file. 1313 @acronym{URL} is a ``file name'' of the form
1201 @code{movemail} handles such a name by opening a connection to the POP 1314 @samp{pop://@var{username}@@@var{hostname}}, where
1202 server. The @env{MAILHOST} environment variable specifies the machine 1315 @var{hostname} is the host name or IP address of the remote mail
1203 to look for the server on; alternatively, you can specify the POP server 1316 server and @var{username} is the user name on that server.
1204 host name as part of the mailbox name using the syntax 1317 Additionally, you may specify the password in the mailbox @acronym{URL}:
1205 @samp{po:@var{username}:@var{hostname}}. 1318 @samp{pop://@var{username}:@var{password}@@@var{hostname}}. In this
1206 1319 case, @var{password} takes preference over the one set by
1320 @code{rmail-remote-password}. This is especially useful if you have
1321 several remote mailboxes with different passwords.
1322
1323 For backward compatibility Rmail also supports two alternative ways
1324 of specifying remote POP mailboxes. Specifying inbox name in the form
1325 @samp{po:@var{username}:@var{hostname}} is equivalent to
1326 @samp{pop://@var{username}@@@var{hostname}}. Alternatively, you may set
1327 a ``file name'' of @samp{po:@var{username}} in the inbox list of an
1328 Rmail file. @code{Movemail} will handle such a name by opening a
1329 connection to the POP server. The @env{MAILHOST} environment variable
1330 will in this case specify the machine to look for the server on.
1331
1332 @cindex IMAP mailboxes
1333 Another method for accessing remote mailboxes is IMAP. This method is
1334 supported only by the @code{mailutils movemail}. To specify an IMAP
1335 mailbox in the inbox list, use the following mailbox @acronym{URL}:
1336 @samp{imap://@var{username}[:@var{password}]@@@var{hostname}}. The
1337 @var{password} part is optional, as descrbed above.
1338
1339 @vindex rmail-remote-password
1340 @vindex rmail-remote-password-required
1207 @vindex rmail-pop-password 1341 @vindex rmail-pop-password
1208 @vindex rmail-pop-password-required 1342 @vindex rmail-pop-password-required
1209 Accessing mail via POP may require a password. If the variable 1343 Accessing a remote mailbox may require a password. Rmail uses the
1210 @code{rmail-pop-password} is non-@code{nil}, it specifies the password 1344 following algorithm to retrieve it:
1211 to use for POP. Alternatively, if @code{rmail-pop-password-required} is 1345
1212 non-@code{nil}, then Rmail asks you for the password to use. 1346 @enumerate
1347 @item
1348 If the @var{password} is present in mailbox URL (see above), it is
1349 used.
1350 @item
1351 If the variable @code{rmail-remote-password} is non-@code{nil}, its
1352 value is used.
1353 @item
1354 Otherwise, if @code{rmail-remote-password-required} is non-@code{nil},
1355 then Rmail will ask you for the password to use.
1356 @item
1357 Otherwise, Rmail assumes no password is required.
1358 @end enumerate
1359
1360 For compatibility with previous versions, @code{rmail-pop-password}
1361 and @code{rmail-pop-password-required} may be used instead of
1362 @code{rmail-remote-password} and @code{rmail-remote-password-required}.
1213 1363
1214 @vindex rmail-movemail-flags 1364 @vindex rmail-movemail-flags
1215 If you need to pass additional command-line flags to @code{movemail}, 1365 If you need to pass additional command-line flags to @code{movemail},
1216 set the variable @code{rmail-movemail-flags} a list of the flags you 1366 set the variable @code{rmail-movemail-flags} a list of the flags you
1217 wish to use. Do not use this variable to pass the @samp{-p} flag to 1367 wish to use. Do not use this variable to pass the @samp{-p} flag to
1229 this, and you would rather read your mail in the order in which it was 1379 this, and you would rather read your mail in the order in which it was
1230 received, you can tell @code{movemail} to reverse the order of 1380 received, you can tell @code{movemail} to reverse the order of
1231 downloaded messages by adding the @samp{-r} flag to 1381 downloaded messages by adding the @samp{-r} flag to
1232 @code{rmail-movemail-flags}. 1382 @code{rmail-movemail-flags}.
1233 1383
1384 @cindex TLS encryption (Rmail)
1385 @code{Mailutils movemail} supports TLS encryption. If you wish to
1386 use it, add the @samp{--tls} flag to @code{rmail-movemail-flags}.
1387
1388 @node Other Mailbox Formats
1389 @section Retrieving Mail from Local Mailboxes in Various Formats
1390
1391 If your incoming mail is stored on a local machine in a format other
1392 than UNIX mailbox, you will need the @code{mailutils movemail} to retrieve
1393 it. @xref{Movemail}, for the detailed description of @code{movemail}
1394 versions.
1395
1396 For example, to retrieve mail from a @code{maildir} inbox located in
1397 @file{/var/spool/mail/in}, you would set the following in Rmail inbox list:
1398
1399 @smallexample
1400 maildir://var/spool/mail/in
1401 @end smallexample
1402
1234 @ignore 1403 @ignore
1235 arch-tag: 034965f6-38df-47a2-a9f1-b8bc8ab37e23 1404 arch-tag: 034965f6-38df-47a2-a9f1-b8bc8ab37e23
1236 @end ignore 1405 @end ignore