aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2005-01-15 14:30:48 +0000
committerEli Zaretskii2005-01-15 14:30:48 +0000
commitea20444b9b492e4f895409618bc4e5cd08498b3f (patch)
treec220b594ed5fe6c196c0c9d9efd97670b7d309f0
parent1086788e9298994ae121b82a11a8c09510cad5e7 (diff)
downloademacs-ea20444b9b492e4f895409618bc4e5cd08498b3f.tar.gz
emacs-ea20444b9b492e4f895409618bc4e5cd08498b3f.zip
Document support for GNU mailutils in rmail.el.
-rw-r--r--man/rmail.texi210
1 files changed, 188 insertions, 22 deletions
diff --git a/man/rmail.texi b/man/rmail.texi
index 23eef5abec8..d9654a88e50 100644
--- a/man/rmail.texi
+++ b/man/rmail.texi
@@ -37,7 +37,10 @@ visiting a proper Rmail file.
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
@@ -1152,9 +1155,116 @@ rot13-other-window}. This displays the current buffer in another window
1152which applies the code when displaying the text. 1155which 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
1157 1160
1161 When invoked for the first time, Rmail attempts to locate
1162@code{movemail} program and determine its version. There are
1163two versions of @code{movemail} program: the native one, shipped with
1164GNU Emacs (we will refer to it as @samp{emacs version}) and the one
1165coming from GNU mailutils (@xref{movemail,,,mailutils,GNU mailutils},
1166we will refer to it as @samp{mailutils version}). Both versions are
1167compatible with each other in the sense that they support the same
1168command line syntax and the same basic subset of options. However,
1169the @samp{mailutils} version offers a much richer set of
1170features.
1171
1172The @samp{Emacs version} of @code{movemail} is able to retrieve mail from usual
1173UNIX mailbox formats and from remote mailboxes using the POP3 protocol.
1174
1175The @samp{Mailutils version} is able to handle a wide set of mailbox
1176formats, such as plain UNIX mailboxes, @code{maildir} and @code{MH}
1177mailboxes, etc. It is able to retrieve remote mail using POP3 or IMAP4
1178protocol. In the latter case, @code{mailutils movemail} can be
1179instructed to retrieve mail using a TLS encrypted channel.
1180
1181The @samp{Mailutils movemail} accepts mailbox argument in the @acronym{URL}
1182form. The detailed description of mailbox @acronym{URL}s can be found
1183in @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
1191where square brackets denote optional elements.
1192
1193@table @var
1194@item proto
1195Specifies the @dfn{mailbox protocol}, or @dfn{format} to
1196use. The exact semantics of the rest of @acronym{URL} elements depends
1197on the actual value of @var{proto}.
1198
1199@item user
1200User name to access the remote mailbox.
1201
1202@item password
1203User password to access the remote mailbox.
1204
1205@item host-or-file-name
1206Hostname of the remote server for remote mailboxes or file name of a
1207local mailbox.
1208@end table
1209
1210@var{Proto} can be one of:
1211
1212@table @asis
1213@item mbox
1214Usual 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
1216the mailbox file, e.g., @code{mbox://var/spool/mail/smith}.
1217
1218@item mh
1219A 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
1224A 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
1229Any local mailbox format. Its actual format is detected automatically
1230by @code{movemail}.
1231
1232@item pop
1233A remote mailbox to be accessed via POP3 protocol. @var{User}
1234specifies the remote user name to use, @var{pass} may be used to
1235specify the user password, @var{host-or-file-name} is the name or IP
1236address of the remote mail server to connect to; e.g.,
1237@code{pop://smith:guessme@@remote.server.net}.
1238
1239@item imap
1240A remote mailbox to be accessed via IMAP4 protocol. @var{User}
1241specifies the remote user name to use, @var{pass} may be used to
1242specify the user password, @var{host-or-file-name} is the name or IP
1243address of the remote mail server to connect to;
1244e.g., @code{imap://smith:guessme@@remote.server.net}.
1245@end table
1246
1247Alternatively, the mailbox may be specified as a file name of the
1248mailbox 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
1257examines the value of @code{rmail-movemail-program} variable. If it
1258is set, its value is used as a full path to the @code{movemail} binary.
1259Otherwise, Rmail searches for @code{movemail} in the list of directories
1260constructed 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
1266
1267
1158@vindex rmail-preserve-inbox 1268@vindex rmail-preserve-inbox
1159 When getting new mail, Rmail first copies the new mail from the inbox 1269 When getting new mail, Rmail first copies the new mail from the inbox
1160file to the Rmail file; then it saves the Rmail file; then it truncates 1270file to the Rmail file; then it saves the Rmail file; then it truncates
@@ -1175,7 +1285,6 @@ file. If there is a crash at the wrong time, this file continues to
1175exist, and Rmail will use it again the next time it gets new mail from 1285exist, and Rmail will use it again the next time it gets new mail from
1176that inbox. 1286that inbox.
1177 1287
1178@pindex movemail
1179 If Rmail is unable to convert the data in 1288 If Rmail is unable to convert the data in
1180@file{~/.newmail-@var{inboxname}} into Babyl format, it renames the file 1289@file{~/.newmail-@var{inboxname}} into Babyl format, it renames the file
1181to @file{~/RMAILOSE.@var{n}} (@var{n} is an integer chosen to make the 1290to @file{~/RMAILOSE.@var{n}} (@var{n} is an integer chosen to make the
@@ -1186,30 +1295,68 @@ You should look at the file, find whatever message confuses Rmail
1186the corrected file. 1295the corrected file.
1187 1296
1188 Some sites use a method called POP for accessing users' inbox data 1297 Some sites use a method called POP for accessing users' inbox data
1189instead of storing the data in inbox files. @code{movemail} can work 1298instead of storing the data in inbox files. The @code{Emacs
1190with POP if you compile it with the macro @code{MAIL_USE_POP} defined. 1299movemail} can work with POP if you compile it with the macro
1191(You can achieve that by specifying @samp{--with-pop} when you run 1300@code{MAIL_USE_POP} defined. (You can achieve that by specifying
1192@code{configure} during the installation of Emacs.) 1301@samp{--with-pop} when you run @code{configure} during the
1193@code{movemail} only works with POP3, not with older 1302installation of Emacs.)
1303
1304The @code{Mailutils movemail} by default supports POP, unless configured
1305with @samp{--disable-pop} option.
1306
1307Both versions of @code{movemail} only work with POP3, not with older
1194versions of POP. 1308versions of POP.
1195 1309
1196@cindex @env{MAILHOST} environment variable 1310@cindex @env{MAILHOST} environment variable
1197@cindex POP inboxes 1311@cindex POP mailboxes
1198 Assuming you have compiled and installed @code{movemail} 1312 No matter which flavor of @code{movemail} you use, you can specify
1199appropriately, you can specify a POP inbox by using a ``file name'' of 1313POP inbox by using POP @dfn{URL} (@pxref{Movemail}). A POP
1200the form @samp{po:@var{username}}, in the inbox list of an Rmail file. 1314@acronym{URL} is a ``file name'' of the form
1201@code{movemail} handles such a name by opening a connection to the POP 1315@samp{pop://@var{username}@@@var{hostname}}, where
1202server. The @env{MAILHOST} environment variable specifies the machine 1316@var{hostname} is the host name or IP address of the remote mail
1203to look for the server on; alternatively, you can specify the POP server 1317server and @var{username} is the user name on that server.
1204host name as part of the mailbox name using the syntax 1318Additionally, you may specify the password in the mailbox @acronym{URL}:
1205@samp{po:@var{username}:@var{hostname}}. 1319@samp{pop://@var{username}:@var{password}@@@var{hostname}}. In this
1206 1320case, @var{password} takes preference over the one set by
1321@code{rmail-remote-password}. This is especially useful if you have
1322several remote mailboxes with different passwords.
1323
1324 For backward compatibility Rmail also supports two alternative ways
1325of specifying remote POP mailboxes. Specifying inbox name in the form
1326@samp{po:@var{username}:@var{hostname}} is equivalent to
1327@samp{pop://@var{username}@@@var{hostname}}. Alternatively, you may set
1328a ``file name'' of @samp{po:@var{username}} in the inbox list of an
1329Rmail file. @code{Movemail} will handle such a name by opening a
1330connection to the POP server. The @env{MAILHOST} environment variable
1331will in this case specify the machine to look for the server on.
1332
1333@cindex IMAP mailboxes
1334 Another method for accessing remote mailboxes is IMAP. This method is
1335supported only by the @code{mailutils movemail}. To specify an IMAP
1336mailbox in the inbox list, use the following mailbox @acronym{URL}:
1337@samp{imap://@var{username}[:@var{password}]@@@var{hostname}}. The
1338@var{password} part is optional, as descrbed above.
1339
1340@vindex rmail-remote-password
1341@vindex rmail-remote-password-required
1207@vindex rmail-pop-password 1342@vindex rmail-pop-password
1208@vindex rmail-pop-password-required 1343@vindex rmail-pop-password-required
1209 Accessing mail via POP may require a password. If the variable 1344 Accessing a remote mailbox may require a password. Rmail uses the
1210@code{rmail-pop-password} is non-@code{nil}, it specifies the password 1345following algorithm to retrieve it:
1211to use for POP. Alternatively, if @code{rmail-pop-password-required} is 1346
1212non-@code{nil}, then Rmail asks you for the password to use. 1347@enumerate
1348@item If the @var{password} is present in mailbox URL (see above), it
1349is used.
1350@item If the variable @code{rmail-remote-password} is
1351non-@code{nil}, its value is used.
1352@item Otherwise, if @code{rmail-remote-password-required} is
1353non-@code{nil}, then Rmail will ask you for the password to use.
1354@item Otherwise Rmail assumes no password is required.
1355@end enumerate
1356
1357 For compatibility with previous versions, @code{rmail-pop-password}
1358and @code{rmail-pop-password-required} may be used instead of
1359@code{rmail-remote-password} and @code{rmail-remote-password-required}.
1213 1360
1214@vindex rmail-movemail-flags 1361@vindex rmail-movemail-flags
1215 If you need to pass additional command-line flags to @code{movemail}, 1362 If you need to pass additional command-line flags to @code{movemail},
@@ -1231,6 +1378,25 @@ received, you can tell @code{movemail} to reverse the order of
1231downloaded messages by adding the @samp{-r} flag to 1378downloaded messages by adding the @samp{-r} flag to
1232@code{rmail-movemail-flags}. 1379@code{rmail-movemail-flags}.
1233 1380
1381@cindex TLS encryption (Rmail)
1382 @code{Mailutils movemail} supports TLS encryption. If you wish to
1383use it, add the @samp{--tls} flag to @code{rmail-movemail-flags}.
1384
1385@node Other Mailbox Formats
1386@section Retrieving Mail from Local Mailboxes in Various Formats
1387
1388 If your incoming mail is stored on a local machine in a format other
1389than UNIX mailbox, you will need the @code{mailutils movemail} to retrieve
1390it. @xref{Movemail}, for the detailed description of @code{movemail}
1391versions.
1392
1393 For example, to retrieve mail from a @code{maildir} inbox located in
1394@file{/var/spool/mail/in}, you would set the following in Rmail inbox list:
1395
1396@smallexample
1397maildir://var/spool/mail/in
1398@end smallexample
1399
1234@ignore 1400@ignore
1235 arch-tag: 034965f6-38df-47a2-a9f1-b8bc8ab37e23 1401 arch-tag: 034965f6-38df-47a2-a9f1-b8bc8ab37e23
1236@end ignore 1402@end ignore