[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nnimap 0.3.29 -> 0.3.30 patch
Index: nnimap/ChangeLog
diff -c nnimap/ChangeLog:1.69 nnimap/ChangeLog:1.92
*** nnimap/ChangeLog:1.69 Wed Aug 26 05:09:07 1998
--- nnimap/ChangeLog Mon Aug 31 05:50:15 1998
***************
*** 1,3 ****
--- 1,287 ----
+ 1998-08-31 14:48:30 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap 0.3.30 released.
+
+ 1998-08-30 00:20:55 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-update-info-internal): Renamed.
+ (nnimap-request-group): Use it.
+
+ 1998-08-29 23:54:54 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-expunge-close-group): Return t on success.
+
+ 1998-08-29 23:16:26 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-list-mapper): Return t even on empty
+ existant mailboxes.
+
+ 1998-08-29 23:12:07 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-list-mapper): Revert. Shouldn't erase.
+
+ 1998-08-29 22:32:28 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-group):
+ (nnimap-request-list-mapper): Use nnheader-insert.
+
+ 1998-08-29 18:51:51 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.texi: Node fix. Backwards compatibility warning removed.
+
+ 1998-08-29 18:27:12 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.texi: Fix.
+
+ 1998-08-29 18:21:06 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.texi: Add author. Add contributors chapter. Change
+ sections to chapters.
+
+ 1998-08-29 16:55:24 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-update-mark): gnus-del-mark -> \Seen.
+
+ 1998-08-29 16:39:18 Simon Josefsson <jas@pdc.kth.se>
+
+ * imap.el (imap-unselect-folder):
+ (imap-expunge-close-folder): Return t on success
+
+ 1998-08-29 15:49:47 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-expunge-close-group): Use nnimap-need-expunge.
+
+ * nnimap.el (nnimap-split-copy-delete-article):
+ (nnimap-request-expire-articles): Set nnimap-need-expunge.
+
+ 1998-08-29 15:48:34 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-update-info): Return info, even when
+ we aren't really-updating.
+
+ 1998-08-29 15:47:41 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-open-server): No port-extended stuff.
+
+ 1998-08-29 15:47:18 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-authenticate): Allow virtual server name in
+ netrc machine field.
+
+ 1998-08-29 15:46:16 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-need-expunge): New variable. Shouldn't be
+ needed but until I find out what Cyrus is doing, it's there.
+
+ 1998-08-29 15:44:12 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-group): Implement fast method.
+
+ 1998-08-29 15:43:45 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-server-address):
+ (nnimap-server-port): Doc fix, no port stuff.
+
+ 1998-08-29 15:42:01 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.texi (trix):
+ (trix-portfwd): Rename. Port-extended syntax removed, new virtual
+ server name additions.
+
+ 1998-08-29 15:41:27 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.texi (config-expiring): Variable index additions.
+
+ 1998-08-29 14:14:23 Simon Josefsson <jas@pdc.kth.se>
+
+ * imap.el (imap-cb-fetch-hook): New hook.
+ (imap-cb-fetch): Call it.
+
+ 1998-08-29 14:08:51 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.texi (config):
+ (config-expiring): Add documentation about Expiring.
+
+ 1998-08-29 14:08:08 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.texi (Top): Change description about tricks section.
+
+ 1998-08-29 13:56:41 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-expiry-wait):
+ (nnimap-expiry-wait-function): Remove variables.
+ (nnimap-request-expire-articles): Use nnmail-expiry-wait,
+ nnmail-expiry-wait-function.
+
+ 1998-08-29 13:34:41 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-update-info): Don't treat deleted
+ articles as unread.
+
+ 1998-08-29 13:16:22 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-expire-articles-progress): Change
+ gnus-message.
+
+ 1998-08-29 12:28:28 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-expire-articles): Compress article
+ sequence before send.
+
+ 1998-08-29 12:28:02 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-expire-articles-progress): New function.
+ * nnimap.el (nnimap-request-expire-articles): Use it.
+
+ 1998-08-29 12:15:15 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-expire-articles): Don't require
+ gnus-expire flag.
+
+ 1998-08-29 11:47:27 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-expunge-close-group): Don't close nil
+ group. Fix typo.
+
+ 1998-08-29 11:47:07 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-close-group): Really close group.
+
+ 1998-08-29 11:46:36 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (gnus-sum): Require gnus-sum for marks.
+
+ 1998-08-29 11:40:04 Simon Josefsson <jas@pdc.kth.se>
+
+ * imap.el (imap-unselect-folder): Typo.
+
+ 1998-08-29 02:56:51 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-split-articles): Use
+ nnimap-expunge-close-group.
+
+ 1998-08-29 02:55:34 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-expunge-close-group): New function.
+
+ 1998-08-29 02:54:47 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-possibly-change-group): Close group if opening
+ another.
+
+ 1998-08-29 02:29:42 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-update-mark): New function, does most
+ flag setting.
+
+ 1998-08-29 02:27:49 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-update-info): Don't search for flags
+ that isn't there.
+
+ 1998-08-29 02:25:18 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-close-group): Dummy function.
+
+ 1998-08-29 01:37:38 Simon Josefsson <jas@pdc.kth.se>
+
+ * imap.el (imap-timeout): Change default.
+
+ 1998-08-29 00:58:08 Simon Josefsson <jas@pdc.kth.se>
+
+ * imap.el (imap-store-flags-del): New function.
+
+ 1998-08-28 21:46:18 Simon Josefsson <jas@pdc.kth.se>
+
+ * imap.el (imap-store-flags-add): Typo.
+
+ 1998-08-28 21:43:27 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-update-info): Don't wipe out all
+ params.
+
+ 1998-08-28 21:29:18 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-retrieve-groups):
+ * nnimap.el (nnimap-request-list):
+ * nnimap.el (nnimap-group-alist): Was not used, removed until we
+ figure out if we can benefit from it.
+
+ 1998-08-28 21:27:52 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-split--move-article): Remove.
+
+ 1998-08-28 21:16:44 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-body-lines): Doc add.
+
+ 1998-08-28 21:12:45 Simon Josefsson <jas@pdc.kth.se>
+
+ * imap.el (imap-unselect-folder): Group is optional.
+
+ 1998-08-28 20:56:39 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-expunge-on-close): New variable.
+
+ 1998-08-28 20:41:30 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-split-copy-delete-article): Use
+ imap-store-flags-add.
+
+ 1998-08-28 20:34:08 Simon Josefsson <jas@pdc.kth.se>
+
+ * imap.el (imap-store-flags-add): New function.
+
+ 1998-08-28 20:33:06 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-expire-articles): Do expiring.
+
+ 1998-08-28 20:32:56 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-time-substract):
+ (nnimap-date-days-ago): New support functions for expiring.
+
+ 1998-08-28 20:32:37 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-expiry-wait):
+ (nnimap-expiry-wait-function): New variables
+
+ 1998-08-28 09:58:41 Simon Josefsson <jas@pdc.kth.se>
+
+ * README: Update URL.
+
+ 1998-08-28 08:58:14 Simon Josefsson <jas@pdc.kth.se>
+
+ * README: Update.
+
+ 1998-08-28 08:53:54 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.texi: Changed copyright notice.
+
+ 1998-08-28 08:51:46 Simon Josefsson <jas@pdc.kth.se>
+
+ * manual.html: Removed.
+
+ * nnimap.texi: New file, thanks to Martin Fouts.
+
+ 1998-08-28 08:48:02 Simon Josefsson <jas@pdc.kth.se>
+
+ * Makefile (clean): Delete nnimap.info, nnimap.html.
+
+ 1998-08-28 08:19:17 Simon Josefsson <jas@pdc.kth.se>
+
+ * Makefile (all): Added html/info dependencies.
+
+ 1998-08-27 12:16:11 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (nnimap-request-update-info): We might get sued by
+ silly persons.
+
+ 1998-08-26 15:19:33 Simon Josefsson <jas@pdc.kth.se>
+
+ * nnimap.el (gnus-group-nnimap-expunge): Send command in right
+ buffer.
+
1998-08-26 14:06:56 Simon Josefsson <jas@pdc.kth.se>
* nnimap 0.3.29 released
Index: nnimap/Makefile
diff -c nnimap/Makefile:1.12 nnimap/Makefile:1.14
*** nnimap/Makefile:1.12 Tue Aug 25 04:32:04 1998
--- nnimap/Makefile Thu Aug 27 23:50:04 1998
***************
*** 2,8 ****
ELCC=$(EMACS) -batch -q -no-site-file
VERSION=`date +%y%m%d-%H%M`
! all: hmac.elc imap.elc nnimap.elc
hmac.elc: hmac.el
$(ELCC) -f batch-byte-compile hmac.el
--- 2,8 ----
ELCC=$(EMACS) -batch -q -no-site-file
VERSION=`date +%y%m%d-%H%M`
! all: hmac.elc imap.elc nnimap.elc nnimap.info
hmac.elc: hmac.el
$(ELCC) -f batch-byte-compile hmac.el
***************
*** 13,20 ****
nnimap.elc: imap.elc nnimap.el
$(ELCC) -l imap.el -f batch-byte-compile nnimap.el
clean:
! rm -f imap.elc nnimap.elc hmac.elc
tar:
cvs export -D now -d nnimap-$(VERSION) nnimap
--- 13,26 ----
nnimap.elc: imap.elc nnimap.el
$(ELCC) -l imap.el -f batch-byte-compile nnimap.el
+ nnimap.html: nnimap.texi
+ texi2html -menu -monolithic nnimap.texi
+
+ nnimap.info: nnimap.texi
+ makeinfo nnimap.texi
+
clean:
! rm -f imap.elc nnimap.elc hmac.elc nnimap.info nnimap.html
tar:
cvs export -D now -d nnimap-$(VERSION) nnimap
Index: nnimap/README
diff -c nnimap/README:1.2 nnimap/README:1.4
*** nnimap/README:1.2 Fri Aug 14 14:29:48 1998
--- nnimap/README Fri Aug 28 01:00:10 1998
***************
*** 1,6 ****
! 1998-08-03
! A Installation/Configuration guide in HTML is available in manual.html.
--
jas@pdc.kth.se
--- 1,11 ----
! 1998-08-28
! $ make nnimap.info
!
! To get info pages which contains documentation.
!
! Lacking makeinfo, the manual is also available on
! http://www.extundo.com/gnus-imap/nnimap.html.
--
jas@pdc.kth.se
Index: nnimap/imap.el
diff -c nnimap/imap.el:1.30 nnimap/imap.el:1.38
*** nnimap/imap.el:1.30 Wed Aug 26 01:31:27 1998
--- nnimap/imap.el Sat Aug 29 15:09:24 1998
***************
*** 40,45 ****
--- 40,46 ----
;;; o On expunge, remove messages from message-data. Note it doesn't
;;; return UIDs. Ouch.
;;; o Rename "folder" to "mailbox".
+ ;;; o Use Kyle Jones base64 library instead of TM/SEMI.
;;;
(eval-when-compile (require 'cl))
***************
*** 94,100 ****
(defvar imap-last-status nil
"*Status returned by last IMAP command")
! (defvar imap-timeout 20
"*Timeout in seconds to wait for server response.")
(defvar imap-username nil
--- 95,101 ----
(defvar imap-last-status nil
"*Status returned by last IMAP command")
! (defvar imap-timeout 60
"*Timeout in seconds to wait for server response.")
(defvar imap-username nil
***************
*** 103,108 ****
--- 104,113 ----
(defvar imap-password nil
"Password for server.")
+ (defvar imap-cb-fetch-hook nil
+ "Hook called when receiving a FETCH response. Called with article NUM,
+ FETCH and DATA response.")
+
;;; Internal variables
(defvar imap-authinfo nil
***************
*** 489,494 ****
--- 494,513 ----
(when (imap-ok-p (imap-send-command-wait (concat "UID SEARCH " predicate)))
(imap-folder-get 'search))))
+ (defun imap-store-flags-del (articles flags &optional buffer silent)
+ (when (and articles flags)
+ (with-current-buffer (or buffer (current-buffer))
+ (imap-ok-p (imap-send-command-wait
+ (concat "UID STORE " articles
+ " -FLAGS" (if silent ".SILENT") " (" flags ")"))))))
+
+ (defun imap-store-flags-add (articles flags &optional buffer silent)
+ (when (and articles flags)
+ (with-current-buffer (or buffer (current-buffer))
+ (imap-ok-p (imap-send-command-wait
+ (concat "UID STORE " articles
+ " +FLAGS" (if silent ".SILENT") " (" flags ")"))))))
+
(defun imap-select-folder (folder &optional buffer examine)
(with-current-buffer (or buffer (current-buffer))
;; xxx: check SELECT/EXAMINE status! This is BAD.
***************
*** 502,524 ****
imap-message-data nil)))
imap-current-folder))
! (defun imap-unselect-folder (group &optional buffer)
"Close current folder in BUFFER, without expunging articles."
(with-current-buffer (or buffer (current-buffer))
(when (or (and (memq 'UNSELECT (imap-capability-get))
(imap-ok-p (imap-send-command-wait "UNSELECT")))
(and (imap-ok-p
! (imap-send-command-wait (concat "EXAMINE " group)))
! (imap-ok-p (nnimap-send-command-wait "CLOSE"))))
(setq imap-current-folder nil
! imap-message-data nil))))
(defun imap-expunge-close-folder (&optional buffer)
"Expunge articles and close current folder in BUFFER."
(with-current-buffer (or buffer (current-buffer))
(when (imap-ok-p (imap-send-command-wait "CLOSE"))
(setq imap-current-folder nil
! imap-message-data nil))))
;;; Variable setters and getters
--- 521,547 ----
imap-message-data nil)))
imap-current-folder))
! (defun imap-unselect-folder (&optional group buffer)
"Close current folder in BUFFER, without expunging articles."
(with-current-buffer (or buffer (current-buffer))
(when (or (and (memq 'UNSELECT (imap-capability-get))
(imap-ok-p (imap-send-command-wait "UNSELECT")))
(and (imap-ok-p
! (imap-send-command-wait (concat "EXAMINE "
! (or group
! imap-current-folder))))
! (imap-ok-p (imap-send-command-wait "CLOSE"))))
(setq imap-current-folder nil
! imap-message-data nil)
! t)))
(defun imap-expunge-close-folder (&optional buffer)
"Expunge articles and close current folder in BUFFER."
(with-current-buffer (or buffer (current-buffer))
(when (imap-ok-p (imap-send-command-wait "CLOSE"))
(setq imap-current-folder nil
! imap-message-data nil)
! t)))
;;; Variable setters and getters
***************
*** 894,899 ****
--- 917,924 ----
(defun imap-cb-fetch (num fetch data)
"Set `imap-current-message', Set all of the prop/value pairs
in `imap-message-data'."
+ (when imap-cb-fetch-hook
+ (funcall imap-cb-fetch-hook num fetch data))
; (check-valid-plist data) ; Remove me when you have confidence???
(setq data (destructive-plist-to-alist data))
;; All fetches should have used UID FETCH so UID should exist.
Index: nnimap/manual.html
diff -c nnimap/manual.html:1.7 nnimap/manual.html:removed
*** nnimap/manual.html:1.7 Sun Aug 23 05:18:58 1998
--- nnimap/manual.html Mon Aug 31 06:04:03 1998
***************
*** 1,363 ****
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
- <html> <head>
- <title>Installation, configuration and usage instructions for nnimap</title>
- </head>
- <body bgcolor=white>
- <h1>Installation, configuration and usage instructions for nnimap</h1>
-
- <p><hr>
-
- <p><h1>Introduction</h1>
-
- <p>The intent of this document is to describe every aspect of nnimap at the user level.
-
- <ul>
- <li><a href="#download">Downloading, unpacking and compiling nnimap</a>
- <li><a href="#install">Installing nnimap</a>
- <li><a href="#config">Configuring nnimap</a>
- <ul>
- <li><a href="#config-authinfo">Automatic logins using ~/.authinfo</a>
- <li><a href="#config-server">Server variables</a>
- <ul>
- <li><a href="#config-server-address">nnimap-server-address</a>
- <li><a href="#config-server-port">nnimap-server-port</a>
- <li><a href="#config-list-method">nnimap-list-method</a>
- <li><a href="#config-list-pattern">nnimap-list-pattern</a>
- <li><a href="#config-auth-method">nnimap-auth-method</a>
- </ul>
- <li><a href="#config-krb">Required programs for kerberos</a>
- <li><a href="#config-ssl">Required programs for ssl</a>
- </ul>
- <li><a href="#using">Using nnimap</a>
- <ul>
- <li><a href="#using-acl">Editing ACL's</a>
- </ul>
- <li><a href="#split">Configuring splitting</a>
- <ul>
- <li><a href="#split-crosspost">nnimap-split-crosspost</a>
- <li><a href="#split-inbox">nnimap-split-inbox</a>
- <li><a href="#split-rule">nnimap-split-rule</a>
- </ul>
- <li><a href="#trix">Neat tricks</a>
- <ul>
- <li><a href="#trix-verbose">Getting verbose information</a>
- <li><a href="#trix-summary">Showing article length in the summary buffer</a>
- <li><a href="#trix-caching">Article caching</a>
- <li><a href="#trix-portfwd">Automatic logins against a server with multiple servers</a>
- </ul>
- </ul>
-
- <h2><a name="download">Downloading, unpacking and compiling nnimap</a></h2>
-
- <p>The latest version of this nnimap implementation is always available as <a href="nnimap.tar.gz">http://vic20.dzp.se/gnus-imap/nnimap.tar.gz</a>.
-
- <p>Download the archive and unpack it.
-
- <pre>
- $ tar xfz nnimap.tar.gz
- </pre>
-
- <p>This will create a directory nnimap-X/ which contain all files. X is the current version number.
-
- <p>Compile it by issuing the following commands:
-
- <pre>
- $ cd nnimap-0.3.11
- $ make
- </pre>
-
- <p>If you use XEmacs, use <code>make EMACS=xemacs</code> instead.
-
- <h2><a name="install">Installing nnimap</a></h2>
-
- <p>You now need to tell Emacs about nnimap. This is done by editing <code>~/.emacs</code>. Put the following in the file:
-
- <pre>
- (setq load-path
- (cons (expand-file-name "~/elisp/nnimap-0.3.11") load-path))
- (require 'nnimap)
- </pre>
-
- <p>Replace ~/elisp/nnimap-0.3.11 with the directory name created when you untared nnimap.
-
- <p>(You could put this in <code>~/.gnus</code> instead if you like.)
-
- <p>Fire up Gnus and you should be able to tinker with nnimap in the server buffer. If you aren't familiar with the server buffer, never mind you wont miss anything. (Ok, ok, the excellent Gnus manual has a section on <a href="http://www.gnus.org/manual/gnus_6.html#SEC130">the server buffer</a> if you want to know.)
-
- <h2><a name="config">Configuring nnimap</a></h2>
-
- <p>To tell nnimap about your IMAP servers, you have to modify <code>gnus-secondary-select-methods</code> (or maybe, <code>gnus-select-method</code>) in your <code>~/.gnus</code>.
-
- <p>The following describes a situation where you would have a nnfolder server (perhaps for storing old personal mail you don't want to store online?) and two nnimap servers.
-
- <pre>
- (setq gnus-secondary-select-methods
- '((nnfolder "")
- (nnimap "dada"
- (nnimap-server-address "cyrus.andrew.cmu.edu")
- (nnimap-list-pattern ("INBOX" "archive.*")))
- (nnimap "yoyo"
- (nnimap-auth-method cram-md5)
- (nnimap-server-address "your.mail.server"))))
- </pre>
-
- Now when Gnus starts, it will ask you for a username/password for each IMAP server.
-
- <p>(For information about the cyrus public IMAP server, there is more information <a href="http://andrew2.andrew.cmu.edu/cyrus/cyrustest.html">available</a>.)
-
- <h3><a name="config-authinfo">Automatic logins using ~/.authinfo</a></h3>
-
- <p>Tired of telling nnimap about your username/password all the time? The New and Improved Gnus, Gnus series 5.6.x that is, can do this for you.
-
- <p>Unfortunely, you still have to tell it your username/password once. Whee, what a bugger. A bigger bugger (huh?) however is that you have to store the password clear-text in a file. Depending on your level of paranoia you may or may not want to do this.
-
- <p>Anyway, nnimap looks for a file ~/.authinfo (<code>nnimap-authinfo-file</code>) which contains the username/password. This file follows the old "netrc" format.
-
- <p>Example <code>~/.authinfo</code> file:
-
- <p><pre>
- machine mail.server login arne password aDd12xX1
- default login anonymous password arne@domain.org
- </pre>
-
- <h3><a name="config-server">Server variables</a></h3>
-
- <h4><a name="config-server-address">nnimap-server-address</a></h4>
-
- <p>Hostname or IP address of IMAP server to use. Defaults to the Gnus server name ("dada" and "yoyo" in the examples above) unless specified.
-
- <h4><a name="config-server-port">nnimap-server-port</a></h4>
-
- Port on server to contact. Defaults to 143.
-
- <h4><a name="config-list-method">nnimap-list-method</a></h4>
-
- <p>When listing mailboxes on the server, the IMAP protocol has two commands. "LIST", the default in nnimap, lists all mailboxes (limited by <code>nnimap-list-pattern</code>). "LSUB" lists all subscribed mailboxes.
-
- <p>Currently nnimap does not support server side subscribing/unsubscribing so the natural choice is "LIST". However, if you have subscribed to interesting mailboxes using another IMAP client you could take advantage of this selection by telling nnimap to use it.
-
- <p>Example:
-
- <p><pre>
- (setq gnus-secondary-select-methods
- '((nnimap "nana"
- (nnimap-server-address "mail.server")
- (nnimap-list-method "LSUB"))))
- </pre>
-
- <h4><a name="config-list-pattern">nnimap-list-pattern</a></h4>
-
- <p>String or list of strings of mailboxes to limit available groups to. This has two uses.
-
- <p>First, as shown in the example, limiting the number of mailboxes you're interested in on a server with very many mailboxes.
-
- <p>Secondly but related, if using the UW server you want to limit the mailboxes to thoose in ~/Mail/* for instance.
-
- <p>The string can also be a cons of REFERENCE and the string as above, what REFERENCE is used for is server specific, but on the UWash server you can specify the directory to use. Another example:
-
- <p>Example:
-
- <p><pre>
- (setq gnus-secondary-select-methods
- '((nnimap "nana"
- (nnimap-server-address "mail.server")
- (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*" ("~friend/Mail/" . "list/*"))))))
- </pre>
-
- <!--
- <p>Some reports indicate that MS Exchange also requires a REFERENCE value, the semantic is unknown but it didn't work with a nil reference (no groups were returned on LIST). Try this:
-
- <p><code>("*" . "*")</code>
-
- -->
-
- <h4><a name="config-auth-method">nnimap-auth-method</a></h4>
-
- <p>This server variable let's you change the login scheme used for the server.
-
- <p>Valid options are:
-
- <p><dl>
- <dt>smart
- <dd>Try to figure out which scheme we should use. Currently this cannot deal with kerberos and ssl, but it will choose CRAM MD5 over plain text passwords.
- <dt>login
- <dd>Force plain text password LOGIN.
- <dt>cram-md5
- <dd>Force CRAM MD5 authentication. <b>Note!</b> Requires (X)Emacs 20.x.
- <dt>kerberos4
- <dd>Force KERBEROS_V4 authentication. See <a href="#config-krb">Required programs for kerberos</a> for further notes.
- <dt>ssl
- <dd>Force SSL encryption. See <a href="#config-ssl">Required programs for SSL</a> for further notes.
- </dl>
-
- <p>Example:
-
- <p><pre>
- (setq gnus-secondary-select-methods
- '((nnimap "nana"
- (nnimap-server-address "mail.server")
- (nnimap-auth-method kerberos4))))
- </pre>
-
- <h3><a name="config-krb">Required programs for kerberos</a></h3>
-
- <p>For Kerberos authentication and encryption you need to have the external program "imtest" (comes with <a href="http://andrew2.andrew.cmu.edu/cyrus/">Cyrus IMAPD</a>) in your path.
-
- <h3><a name="config-ssl">Required programs for ssl</a></h3>
-
- <p>For SSL encryption you need to have the external program "s_client" (comes with <a href="http://www.ssleay.org/">SSLeay</a>) in your path.
-
- <p><b>Note!</b> If you get SSL to work, please send me a note! I have not been able to verify that this work.
-
- <h2><a name="using">Using nnimap</a></h2>
-
- <p>So now what? You've started your Gnus, and there is nothing other than all those mail you keep telling yourself you will read tomorrow? No free beers, no world peace, no nothing. Ahem, afraid so, it's scheduled to be in version 1.0 though.
-
- <p>To access IMAP mailboxes you need to subscribe to them. Use 'U' (<code>gnus-group-unsubscribe-group</code>) in the Group buffer and use command completion to show what mailboxes are available. If you want to subscribe to many mailboxes or want a somewhat fancier look of your mailboxes, you should really learn how to use the server buffer (see <a href="#install">the install section</a>).
-
- <p>After subscribing to one or more mailboxes you found interesting Gnus will show that you haven't read any mail at all in that group. Gnus is only guessing the first time, so press 'M-g' on the group (in the group buffer) to force a new mail fetch (which also updates all marks).
-
- <p>Even after 'g' (or 'M-g'), Gnus may show that you have an enourmus amount of unread mail in that group. This is because Gnus is only making an estimate of how many articles are in group, and it makes this estimate by calculating HIGH-LOW+1, where HIGH is the article number of the latest article and LOW is article number of the oldest article. To possibly correct this, enter (SPC or RET) and exit the group ('q'). This will mark all nonexistant articles as read (an oddity in Gnus, you don't want to know). There could still be problems, currently you'll have to live with this. Please report what server you are using and exactly what problems you see, so I'm aware if this is a big problem for many people.
-
- <p>That's it. You should now be able to use the group as any other group.
-
- <h3><a name="using-acl">Editing ACL's</a></h3>
-
- <p>ACL stands for Access Control Lists and are used for limiting (or enabling) other users access to your mail boxes. Not all server support this, you'll find out if your server does when you try to use this function.
-
- <p>To edit a group's ACL, move the cursor in the Group buffer to a nnimap Group and type G l (<code>gnus-group-edit-nnimap-acl</code>) to have it jump to the ACL editor. The instructions presented in that buffer should get you going.
-
- <p>Some possible uses:
-
- <p><ul>
- <li>Giving "anyone" the "lrs" rights (lookup, read, keep seen/unseen flags) on your mailing list mailboxes enables other users on the same server to follow the list without subscribing to it.
- <li>At least with the Cyrus server, you are required to give the user "anyone" posting ("p") capabilities to have "plussing" work (that is, mail sent to user+mailbox@domain ending up in the IMAP mailbox INBOX.mailbox).
- </ul>
-
- <h2><a name="split">Configuring nnimap, splitting</a></h2>
-
- <p>Splitting is something Gnus users has loved and used for years, and now the rest of the world is catching up. Yeah, dream on, not many IMAP server has server side splitting and those that have splitting seem to use some non-standard protocol. This means that IMAP support for Gnus has to do it's own splitting.
-
- <p>And it does.
-
- <p><b>Warning!</b> This is stuff that will change in the coming releases of nnimap. Actually, this goes for anything in this document, I will not try to be backwards compatible at all.
-
- <p>There are three variables of interest:
-
- <h4><a name="split-crosspost">nnimap-split-crosspost</a></h4>
-
- <p>If non-nil, do crossposting if several split methods match the mail. If nil, the first match in nnimap-split-rule found will be used.
-
- <pre>
- (setq nnimap-split-crosspost t)
- </pre>
-
- <p>Nnmail equivalent: <code>nnmail-crosspost</code>.
-
- <h4><a name="split-inbox">nnimap-split-inbox</a></h4>
-
- <p>A string or a list of strings that gives the name(s) of IMAP mailboxes to read mail from and split according the the split rule. Defaults to nil, which means that splitting is disabled!
-
- <pre>
- (setq nnimap-split-inbox '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
- </pre>
-
- <p>No nnmail equivalent.
-
- <h4><a name="split-rule">nnimap-split-rule</a></h4>
-
- <p>New mail found in <code>nnimap-split-inbox</code> will be split according to this variable.
-
- <p>This variable contains a list of lists, where the first element in the sublist gives the name of the IMAP mailbox to move articles matching the regexp in the second element in the sublist. Got that? Neither did I, we need examples.
-
- <pre>
- (setq nnimap-split-rule
- '(("INBOX.gnus-imap" "^Sender: owner-gnus-imap@vic20.dzp.se")
- ("INBOX.spam" "^Subject:.*MAKE MONEY")
- ("INBOX.private" "")))
- </pre>
-
- <p>This will put all articles from the gnus-imap mailing list into the IMAP mailbox INBOX.gnus-imap, all articles containing MAKE MONEY in the Subject: line in INBOX.spam and everything else in INBOX.private.
-
- <p>It's probably a very good idea to have a empty regexp as the last entry has in the example, this will clear the incoming mailbox from mail that otherwise would be subject to the splitting process every time you start Gnus.
-
- <p>The splitting code tries to create mailboxes if it has too.
-
- <p>Nnmail (semi-)equivalent: <code>nnmail-split-methods</code>.
-
- <h2><a name="trix">Neat tricks</a></h2>
-
- <h3><a name="trix-verbose">Getting verbose information</a></h3>
-
- <p>You want something to watch while you wait for nnimap to do it's work?
-
- <pre>
- (setq gnus-verbose 9)
- </pre>
-
- <p>You could try 10 too, then you will see every IMAP command sent to the server. A little bit too noisy IMHO.
-
- <p>The default is 7.
-
- <h3><a name="trix-summary">Showing article length in the summary buffer</a></h3>
-
- <p>The number of lines are showed in the summary buffer, yes, but the octet count can be interesting too. I use the following:
-
- <pre>
- (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-20,20n%]%) (%c) %s\n")
- </pre>
-
- <p>I've added the " (%c)" part at the end of the string.
-
- <h3><a name="trix-caching">Article caching</a></h3>
-
- <p>Are you using nnimap from home, over a dialup connection? Then maybe "Article Caching", another Gnus feature, is for you.
-
- <p>You should really read the <a href="http://www.gnus.org/manual/gnus_3.html#SEC76">Gnus manual on Article Caching</a> to get the whole picture, but here is a simple setup for your convinience:
-
- <pre>
- (setq gnus-use-cache t)
- (setq gnus-cache-directory "~/Mail/cache/")
- (setq gnus-cache-enter-articles '(ticked dormant read unread))
- (setq gnus-cache-remove-articles nil)
- (setq gnus-cacheable-groups "^nnimap")
- </pre>
-
- <p><h3><a name="trix-portfwd">Automatic logins against a server with multiple servers</a></h3>
-
- <p>Scenario: You want to connect to multiple IMAP servers. You've seen the X Files so you know you can't trust anyone, so you've written your own privacy/encryption suite. Using it, you've securely forwarded the connections to your IMAP servers and have them available on <code>localhost:4711</code>, <code>localhost:4712</code>, <code>localhost:4713</code> and so on.
-
- <p>So what's the problem? Just add them to your <code>gnus-secondary-select-method</code> just as any other servers. But of course, this works.
-
- <p>However, if you want to use <a href="#config-authinfo">automatic logins using a ~/.authinfo file</a> you'll find out that this file format doesn't support multiple services on the same host.
-
- <p>Nnimap has solved this problem by introducing something called a "port-extended" format. I think a example will tell you what you need to do:
-
- <p>Example, ~/.authinfo file:
-
- <p><pre>
- machine localhost:4711 login user1 password pw1
- machine localhost:4712 login user2 password pw2
- machine localhost:4713 login user3 password pw3
- </pre>
-
- <p>And your ~/.gnus would contain something like:
-
- <p><pre>
- (setq gnus-secondary-select-methods
- '((nnimap "srv1"
- (nnimap-server-address "localhost:4711"))
- (nnimap "srv2"
- (nnimap-server-address "localhost:4712"))
- (nnimap "srv3"
- (nnimap-server-address "localhost:4713"))))
- </pre>
-
- <p>Now you should be able to connect to your IMAP server securly to read your mail, which, by the way, has been sent in clear-text through the entire internet.
-
- <hr>
- <a href="mailto:jas@pdc.kth.se"><address>jas@pdc.kth.se</address></a>
- <!-- hhmts start -->
- Last modified: Sun Aug 23 14:16:18 METDST 1998
- <!-- hhmts end -->
- </body> </html>
--- 0 ----
Index: nnimap/nnimap.el
diff -c nnimap/nnimap.el:1.59 nnimap/nnimap.el:1.73
*** nnimap/nnimap.el:1.59 Wed Aug 26 05:08:50 1998
--- nnimap/nnimap.el Sat Aug 29 15:24:10 1998
***************
*** 47,61 ****
;;; Todo (roughly in order of priority):
! ;;; o Convert the manual to texi.
;;; o Verify that we don't use IMAP4rev1 specific things (RFC2060 App B)
- ;;; o nnimap-request-close-group should do incremental flag setting
- ;;; instead of first clearing all flags and setting them again. It also
- ;;; shouldn't try to set flags at all in read-only groups.
;;; o split to other backends, different split rules for different
;;; servers/inboxes
! ;;; o fix nnimap-request-list 'fast and default to it if possible
! ;;; o Do we dare to send the EXPUNGE command?
;;; o Split up big fetches (1,* header especially) in smaller chunks
;;; o use \Draft to support the draft group??
;;; o What do I do with gnus-newsgroup-*?
--- 47,57 ----
;;; Todo (roughly in order of priority):
! ;;; o Move common IMAP commands to functions in imap.el.
;;; o Verify that we don't use IMAP4rev1 specific things (RFC2060 App B)
;;; o split to other backends, different split rules for different
;;; servers/inboxes
! ;;; o dont uid fetch 1,* in nnimap-retrive-groups (slow)
;;; o Split up big fetches (1,* header especially) in smaller chunks
;;; o use \Draft to support the draft group??
;;; o What do I do with gnus-newsgroup-*?
***************
*** 70,77 ****
;;; o Add support for the following: (if applicable)
;;; request-list-newsgroups, request-regenerate
! ;;; list-active-group, request-update-mark,
! ;;; request-expire-articles,
;;; request-associate-buffer, request-restore-buffer,
;;; o When UIDVALIDITY changed, I should reconstruct everything gnus knows
--- 66,72 ----
;;; o Add support for the following: (if applicable)
;;; request-list-newsgroups, request-regenerate
! ;;; list-active-group,
;;; request-associate-buffer, request-restore-buffer,
;;; o When UIDVALIDITY changed, I should reconstruct everything gnus knows
***************
*** 85,91 ****
;;; o ACAP stuff (perhaps a different project, would be nice to ACAPify
;;; .newsrc.eld)
;;; o MIME
- ;;;
(require 'imap)
--- 80,85 ----
***************
*** 93,98 ****
--- 87,93 ----
(require 'nnheader)
(require 'nnmail)
(require 'gnus)
+ (require 'gnus-sum)
(require 'gnus-range)
(eval-when-compile (require 'cl))
***************
*** 102,108 ****
(nnoo-declare nnimap) ; we derive from no one
! (defconst nnimap-version "nnimap 0.3.29")
;; Various server variables.
--- 97,103 ----
(nnoo-declare nnimap) ; we derive from no one
! (defconst nnimap-version "nnimap 0.3.30")
;; Various server variables.
***************
*** 138,166 ****
subscribed. LIST means every matching group should be retrieved.")
(defvoo nnimap-server-address nil
! "*The name of the IMAP server. If nil, uses the virtual server's name.
!
! The port should be specified with nnimap-server-port, but can also be
! done here by using the port-extended syntax:
!
! server.name:143
!
! Of course, the default port is 143 so you would specify some other
! port if you need to use this.")
(defvoo nnimap-server-port nil
! "*The port of the IMAP server. If nil, uses the default port. (143).
!
! If you have multiple servers on the same host (but different ports),
! you can't use this option together with nnimap-authinfo, since netrc
! is a one-service file. You should then specify the port in
! nnimap-server-address using the port-extended syntax, and use the same
! port-extended address in your authinfo file, and don't use this
! variable at all.")
(defvoo nnimap-imap-defs nil
"*Definitions of variables to set up in the IMAP buffer.")
(defvoo nnimap-group-list-speed 'slow ; 'fast, 'medium
"*If fast, do not show number of articles in the group list.
If medium, guess number of articles by using the UIDNEXT attribute.
--- 133,158 ----
subscribed. LIST means every matching group should be retrieved.")
(defvoo nnimap-server-address nil
! "*The name of the IMAP server. If nil, uses the virtual server's name.")
(defvoo nnimap-server-port nil
! "*The port of the IMAP server. If nil, uses the default port. (143).")
(defvoo nnimap-imap-defs nil
"*Definitions of variables to set up in the IMAP buffer.")
+ (defvoo nnimap-expunge-on-close 'always ; 'ask, 'never
+ "When a IMAP group with articles marked for deletion is closed, this
+ variable determine if nnimap should actually remove the articles or
+ not.
+
+ If always, nnimap always perform a expunge when closing the group.
+ If never, nnimap never expunges articles marked for deletion.
+ If ask, nnimap will ask you if you wish to expunge marked articles.
+
+ When setting this variable to `never', you can only expunge articles
+ by using `G x' (gnus-group-nnimap-expunge) from the Group buffer.")
+
(defvoo nnimap-group-list-speed 'slow ; 'fast, 'medium
"*If fast, do not show number of articles in the group list.
If medium, guess number of articles by using the UIDNEXT attribute.
***************
*** 238,248 ****
(const :format "" "password")
(string :format "Password: %v")))))))
-
;; Internal variables.
!
! (defvoo nnimap-group-alist nil)
(defvoo nnimap-server-buffer nil)
;; radford:
--- 230,238 ----
(const :format "" "password")
(string :format "Password: %v")))))))
;; Internal variables.
! (defvoo nnimap-need-expunge nil)
(defvoo nnimap-server-buffer nil)
;; radford:
***************
*** 273,278 ****
--- 263,271 ----
nnimap-close-server
nnimap-open-server
nnimap-authenticate
+ nnimap-expunge-close-group
+ nnimap-date-days-ago
+ nnimap-time-substract
nnimap-possibly-change-group
nnimap-possibly-change-server
nnimap-request-accept-article
***************
*** 294,302 ****
; nnimap-ok-p
nnimap-split-copy-delete-article
nnimap-split-move-article
! nnimap-split-to-groups
nnimap-split-articles
! nnimap-request-update-info
nnimap-request-update-mark
nnimap-retrieve-groups
nnimap-retrieve-headers
--- 287,295 ----
; nnimap-ok-p
nnimap-split-copy-delete-article
nnimap-split-move-article
! ; nnimap-split-to-groups
nnimap-split-articles
! nnimap-request-update-info-internal
nnimap-request-update-mark
nnimap-retrieve-groups
nnimap-retrieve-headers
***************
*** 304,309 ****
--- 297,303 ----
nnimap-status-message
nnimap-update-alist-soft
nnimap-range-to-string
+ nnimap-request-expire-articles-progress
nnimap-request-expire-articles
nnimap-request-move-article
gnus-group-nnimap-edit-acl-done
***************
*** 324,329 ****
--- 318,325 ----
(nnoo-define-basics nnimap)
(defun nnimap-body-lines (body)
+ "Return number of lines in article by looking at the mime bodystructure
+ BODY."
(if (listp body)
(if (stringp (car body))
(cond ((and (string= (car body) "TEXT")
***************
*** 344,350 ****
(when (nnimap-possibly-change-group group server)
(with-current-buffer nntp-server-buffer (erase-buffer))
(let* (compressed (uncompressed (gnus-uncompress-sequence articles)))
! (when (numberp fetch-old)
(setcar uncompressed (- (car uncompressed) fetch-old)))
(setq compressed (gnus-compress-sequence uncompressed t))
(with-current-buffer nnimap-server-buffer
--- 340,346 ----
(when (nnimap-possibly-change-group group server)
(with-current-buffer nntp-server-buffer (erase-buffer))
(let* (compressed (uncompressed (gnus-uncompress-sequence articles)))
! (when (numberp fetch-old)
(setcar uncompressed (- (car uncompressed) fetch-old)))
(setq compressed (gnus-compress-sequence uncompressed t))
(with-current-buffer nnimap-server-buffer
***************
*** 382,389 ****
(let (list alist user passwd ok)
(and (fboundp 'gnus-parse-netrc)
(setq list (gnus-parse-netrc nnimap-authinfo-file)
! alist (gnus-netrc-machine
! list nnimap-server-address)
imap-username (gnus-netrc-get alist "login")
imap-password (gnus-netrc-get alist "password")))
(cond ((eq nnimap-auth-method 'smart)
--- 378,387 ----
(let (list alist user passwd ok)
(and (fboundp 'gnus-parse-netrc)
(setq list (gnus-parse-netrc nnimap-authinfo-file)
! alist (or (and (gnus-netrc-get (gnus-netrc-machine
! list server) "machine")
! (gnus-netrc-machine list server))
! (gnus-netrc-machine list nnimap-server-address))
imap-username (gnus-netrc-get alist "login")
imap-password (gnus-netrc-get alist "password")))
(cond ((eq nnimap-auth-method 'smart)
***************
*** 416,464 ****
(unless (assq 'nnimap-server-buffer defs)
(push (list 'nnimap-server-buffer (concat " *nnimap* " server)) defs))
(nnoo-change-server 'nnimap server defs)
! (let* ((pos (string-match ":" nnimap-server-address))
! (port (and pos
! (string-to-number
! (substring nnimap-server-address (1+ pos)))))
! (host (substring nnimap-server-address 0 pos)))
! (condition-case err
! ;; todo: do clever things here if nnimap-auth-method is 'smart
! (let ((imap-open-stream (cond ((eq nnimap-auth-method
! 'kerberos4)
! 'imap-open-imtest-stream)
! ((eq nnimap-auth-method
! 'ssl)
! 'imap-open-ssl-stream))))
! (when (imap-open-server host (or port nnimap-server-port)
! nnimap-server-buffer
! nnimap-imap-defs)
! ;; we only support imap4.*
! (unless (or (memq 'IMAP4 (imap-capability-get
! nnimap-server-buffer))
! (memq 'IMAP4rev1 (imap-capability-get
! nnimap-server-buffer))
! (memq 'IMAP4REV1 (imap-capability-get
! nnimap-server-buffer)))
! (imap-close-server nnimap-server-buffer)
! (nnheader-report
! 'nnimap
! "Sorry, %s is not a IMAP4(rev1) server." host)
! (sit-for 2)
! ;; Make sure we close the server
! (signal 'quit))
! ;; authenticate ourself
! (when (nnimap-authenticate server nnimap-server-buffer)
! (push (cons server nnimap-server-buffer)
! nnimap-server-buffer-alist))))
! ;; Assume error comes from host unknow so we are not connected yet
! (error (kill-buffer nnimap-server-buffer)
! (nnheader-report 'nnimap (cdr err)))
! (quit (let (imap-last-status)
! (imap-close-server nnimap-server-buffer)
! (unless (get-buffer nnimap-server-buffer)
! (kill-buffer nnimap-server-buffer))
! (nnheader-report 'nnimap (cdr err)))))))))
!
(deffoo nnimap-close-server (&optional server)
(let ((s-b (assoc
(setq server (or server (nnoo-current-server 'nnimap)))
--- 414,459 ----
(unless (assq 'nnimap-server-buffer defs)
(push (list 'nnimap-server-buffer (concat " *nnimap* " server)) defs))
(nnoo-change-server 'nnimap server defs)
! (condition-case err
! ;; todo: do clever things here if nnimap-auth-method is 'smart
! (let ((imap-open-stream (cond ((eq nnimap-auth-method
! 'kerberos4)
! 'imap-open-imtest-stream)
! ((eq nnimap-auth-method
! 'ssl)
! 'imap-open-ssl-stream))))
! (when (imap-open-server nnimap-server-address
! nnimap-server-port
! nnimap-server-buffer
! nnimap-imap-defs)
! ;; we only support imap4.*
! (unless (or (memq 'IMAP4 (imap-capability-get
! nnimap-server-buffer))
! (memq 'IMAP4rev1 (imap-capability-get
! nnimap-server-buffer))
! (memq 'IMAP4REV1 (imap-capability-get
! nnimap-server-buffer)))
! (imap-close-server nnimap-server-buffer)
! (nnheader-report
! 'nnimap
! "Sorry, %s is not a IMAP4(rev1) server."
! nnimap-server-address)
! (sit-for 2)
! ;; Make sure we close the server
! (signal 'quit))
! ;; authenticate ourself
! (when (nnimap-authenticate server nnimap-server-buffer)
! (push (cons server nnimap-server-buffer)
! nnimap-server-buffer-alist))))
! ;; Assume error comes from host unknow so we are not connected yet
! (error (kill-buffer nnimap-server-buffer)
! (nnheader-report 'nnimap (cdr err)))
! (quit (let (imap-last-status)
! (imap-close-server nnimap-server-buffer)
! (unless (get-buffer nnimap-server-buffer)
! (kill-buffer nnimap-server-buffer))
! (nnheader-report 'nnimap (cdr err))))))))
!
(deffoo nnimap-close-server (&optional server)
(let ((s-b (assoc
(setq server (or server (nnoo-current-server 'nnimap)))
***************
*** 539,563 ****
;;; `gnus-groups-to-gnus-format' seem to not use a prefix "nnimap+yoyo:"
;;; when entering something into the active-hashtb but it does when
;;; it looks for new news. Damn.
- ;;;
- ;;; Also they seem to want us to update the active-info, but
- ;;; we can;t give a good answer for the lowest message number,
- ;;; so I think that request-update-info should somehow override
- ;;; this once it figures out what the real lowest is.
- ;;;
- ;;; The 'fast' concept is broken. Gnus =relies= on getting data
- ;;; back from this function even if called with fast=t. Yuck.
(deffoo nnimap-request-group (group &optional server fast)
! (nnimap-request-update-info group (gnus-get-info
! (gnus-group-normally-qualified
! 'nnimap server group))
! server
! t)
! (when (nnimap-possibly-change-group group server) ;; SELECT group
! ; (if fast
! ; (with-current-buffer nntp-server-buffer
! ; (erase-buffer)
! ; t)
(with-current-buffer nnimap-server-buffer
;; clear message data, we won't necesserily have to do this if
;; it weren't for buggy CCmail (we can't know how many tagged
--- 534,549 ----
;;; `gnus-groups-to-gnus-format' seem to not use a prefix "nnimap+yoyo:"
;;; when entering something into the active-hashtb but it does when
;;; it looks for new news. Damn.
(deffoo nnimap-request-group (group &optional server fast)
! (if fast
! (with-current-buffer nntp-server-buffer
! (erase-buffer)
! t)
! (gnus-message 7 "Opening nnimap group %s..." group)
! (nnimap-request-update-info-internal
! group (gnus-get-info (gnus-group-normally-qualified 'nnimap server group))
! server)
! (when (nnimap-possibly-change-group group server)
(with-current-buffer nnimap-server-buffer
;; clear message data, we won't necesserily have to do this if
;; it weren't for buggy CCmail (we can't know how many tagged
***************
*** 583,594 ****
;; end of bug workaround code
))
(when articles
! (with-current-buffer nntp-server-buffer
! (erase-buffer)
! (insert (format "211 %d %d %d %s\n"
! exists (max 1 (apply 'min articles))
! (apply 'max articles) group)))
! t)))));)
;; Note that there is no need for this in current Gnus (5.6.27), all
;; you need to do is use gnus-group-prefixed-name. I'm not sure when
--- 569,577 ----
;; end of bug workaround code
))
(when articles
! (nnheader-insert "211 %d %d %d %s\n" exists
! (max 1 (apply 'min articles))
! (apply 'max articles) group)))))))
;; Note that there is no need for this in current Gnus (5.6.27), all
;; you need to do is use gnus-group-prefixed-name. I'm not sure when
***************
*** 604,660 ****
group
(gnus-group-prefixed-name group method))))
- (defvar nnimap-mark-to-flag-alist
- (mapcar
- (lambda (pair) ; cdr is the mark
- (or (assoc (cdr pair)
- '((read . "\\Seen")
- (tick . "\\Flagged")
- ;;(expire . "\\Deleted")
- (draft . "\\Draft")
- (reply . "\\Answered")))
- (cons (cdr pair)
- (format "gnus-%s" (symbol-name (cdr pair))))))
- (cons '(read . read) gnus-article-mark-lists)))
-
- ;;; We need to optimize for no changes i.e. doing Q. We should
- ;;; not touch the server.
- ;;; When someone Qs out of a group we could EXAMINE first???
(deffoo nnimap-close-group (group &optional server)
(when (nnimap-possibly-change-group group server)
! (setq server (or server (nnoo-current-server 'nnimap)))
! (with-current-buffer nnimap-server-buffer
! ;; For now we assume that we need to sync the group-info
! ;; with the server here.
! (if (and (imap-folder-get 'writable)
! (imap-folder-get 'permanentflags group))
! (let* ((info (gnus-get-info
! (gnus-group-normally-qualified 'nnimap server group)))
! (marks (gnus-info-marks info)))
! (unless (eq 0 (imap-folder-get 'EXISTS))
! ;; Cyrus server (v1.5.2) disconnects on empty groups ???
! (nnimap-send-command-wait
! (concat "UID STORE 1:* -FLAGS.SILENT ("
! (mapconcat
! 'identity
! (remove "\\*" (imap-folder-get 'permanentflags group))
! " ")
! ")")))
! (mapc
! (lambda (mark-flag)
! (if (nnimap-flag-permanent-p mark-flag group)
! (let ((val (if (equal 'read (car mark-flag))
! (gnus-info-read info)
! (cdr (assoc (car mark-flag) marks)))))
! (if val
! (nnimap-send-command-wait
! (concat "UID STORE "
! (nnimap-range-to-string val)
! " +FLAGS.SILENT (" (cdr mark-flag) ")"))))))
! nnimap-mark-to-flag-alist)))
! ;; Expunge and close.
! (when (imap-expunge-close-folder)
! t))))
;;; Returns: GROUP HIGHEST LOWEST [ynmxj=]
(defun nnimap-request-list-mapper (group)
--- 587,595 ----
group
(gnus-group-prefixed-name group method))))
(deffoo nnimap-close-group (group &optional server)
(when (nnimap-possibly-change-group group server)
! (nnimap-expunge-close-group)))
;;; Returns: GROUP HIGHEST LOWEST [ynmxj=]
(defun nnimap-request-list-mapper (group)
***************
*** 670,676 ****
articles)
(if (eq 0 exists)
(with-current-buffer nntp-server-buffer
! (insert (format "%s 0 1 y\n" group)))
;; if it weren't for buggy CCmail we needn't reset
(imap-message-reset)
(when (nnimap-ok-p (nnimap-send-command-wait "FETCH 1,* (UID)"))
--- 605,612 ----
articles)
(if (eq 0 exists)
(with-current-buffer nntp-server-buffer
! (insert (format "%s 0 1 y\n" group))
! t)
;; if it weren't for buggy CCmail we needn't reset
(imap-message-reset)
(when (nnimap-ok-p (nnimap-send-command-wait "FETCH 1,* (UID)"))
***************
*** 733,739 ****
(cdr pattern))))))
(let ((nnimap-group-list-speed 'fast))
(imap-folder-map 'nnimap-request-list-mapper))
- (setq nnimap-group-alist (nnmail-get-active))
t)))
--- 669,674 ----
***************
*** 758,764 ****
server)
(while (setq group (pop groups))
(nnimap-request-list-mapper group)))
- ;; (setq nnimap-group-alist (nnmail-get-active)))
'active)))
(defvar nnimap-mark-to-predicate-alist
--- 693,698 ----
***************
*** 774,851 ****
(format "KEYWORD gnus-%s" (symbol-name (cdr pair))))))
gnus-article-mark-lists))
(defun nnimap-flag-permanent-p (mark-string group)
! (or (member (cdr (assoc (car mark-string)
nnimap-mark-to-flag-alist))
(imap-folder-get 'permanentflags group))
(and (string-match "gnus-" (cdr mark-string))
(member "\\*" (imap-folder-get 'permanentflags group)))))
! (deffoo nnimap-request-update-info (group info &optional server silly)
! (when silly
! ;; We reset the uidvalidity here because we are about to do a full
! ;; resync. xxx: removes timestamp and stuff.
! (gnus-info-set-params info '((uidvalidity . nil)) t)
!
! (when (nnimap-possibly-change-group group server) ;; SELECT
! (with-current-buffer nnimap-server-buffer
! (gnus-message 5 "Updating info for mailbox %s" group)
!
! ;; extend info to have parameters (otherwise when we set them,
! ;; they don't get set)
! ;;(unless (gnus-info-params info)
! ;; (gnus-info-set-params info nil t))
!
! ;; Replace list of read and marked articles with authoritative
! ;; data from server
! (gnus-info-set-read
! info
! ;; xxx This is extremely slow.
! (let* (
! ;; oldseen could contain articles marked unread by other
! ;; imap clients! we correct this
! (oldseentmp (gnus-uncompress-range (gnus-info-read info)))
! (unseen (imap-search "UNSEEN"))
! (oldseen (gnus-set-difference oldseentmp unseen))
! ;; oldseen might lack articles marked as read by other
! ;; imap clients! we correct this
! (newseen (imap-search "SEEN"))
! ;; ok, read articles are in oldseen+newseen (xxx lots of dupes)
! (seen (append oldseen newseen))
! ;; sort to have gnus-compress-sequence remove dupes
! (seens (sort seen '<))
! (read (gnus-compress-sequence seens t)))
! (if (and read
! (atom (car read)))
! (list (cons (car read) (car read))) ;; xxx not my bug
! read)))
! (mapc
! (lambda (mark-search)
! (if (nnimap-flag-permanent-p mark-search group)
! (gnus-info-set-marks
! info
! (nnimap-update-alist-soft (car mark-search)
! (gnus-compress-sequence
! (imap-search (cdr mark-search)))
! (gnus-info-marks info)))))
! nnimap-mark-to-predicate-alist))
! info)))
;;; Respond to articles with mail
(deffoo nnimap-request-type (group article)
'mail)
- ;; Move article ARTICLE from group GROUP on current server to group
- ;; TO-GROUP.
(defun nnimap-split-copy-delete-article (article group to-group)
(when (nnimap-ok-p (nnimap-send-command-wait
(format "UID COPY %d %s" article to-group)))
! (let ((store
! (nnimap-send-command-wait
! (format "UID STORE %d +FLAGS (\\Seen \\Deleted)" article))))
! (if (nnimap-ok-p store)
! (message "IMAP split: moved %s:%d to %s" group article to-group)
! (error "IMAP flag store failed: %s (you may have unread mail marked as read!)" store)))))
(defun nnimap-split-move-article (article group to-group)
(when to-group
--- 708,798 ----
(format "KEYWORD gnus-%s" (symbol-name (cdr pair))))))
gnus-article-mark-lists))
+ (defvar nnimap-mark-to-flag-alist
+ (mapcar
+ (lambda (pair) ; cdr is the mark
+ (or (assoc (cdr pair)
+ '((read . "\\Seen")
+ (tick . "\\Flagged")
+ ;;(expire . "\\Deleted")
+ (draft . "\\Draft")
+ (reply . "\\Answered")))
+ (cons (cdr pair)
+ (format "gnus-%s" (symbol-name (cdr pair))))))
+ (cons '(read . read) gnus-article-mark-lists)))
+
(defun nnimap-flag-permanent-p (mark-string group)
! (or (member (cdr (assoc (car mark-string)
nnimap-mark-to-flag-alist))
(imap-folder-get 'permanentflags group))
(and (string-match "gnus-" (cdr mark-string))
(member "\\*" (imap-folder-get 'permanentflags group)))))
! ;; This is nnimap-request-update-info, but it's so extremely slow
! ;; we can't have Gnus call it all the time. Instead, it's called upon
! ;; nnimap-request-group.
! (deffoo nnimap-request-update-info-internal (group info &optional server)
! ;; We reset the uidvalidity here because we are about to do a full resync.
! (gnus-info-set-params info (nnimap-update-alist-soft
! 'uidvalidity nil (gnus-info-params info)) t)
!
! (when (nnimap-possibly-change-group group server) ;; SELECT
! (with-current-buffer nnimap-server-buffer
! (gnus-message 5 "Updating info for mailbox %s" group)
!
! ;; extend info to have parameters (otherwise when we set them,
! ;; they don't get set)
! (unless (gnus-info-params info)
! (gnus-info-set-params info nil t))
!
! ;; Replace list of read and marked articles with authoritative
! ;; data from server
! (gnus-info-set-read
! info
! ;; xxx This is extremely slow.
! (let* (
! ;; oldseen could contain articles marked unread by other
! ;; imap clients! we correct this
! (oldseentmp (gnus-uncompress-range (gnus-info-read info)))
! (unseen (imap-search "UNSEEN UNDELETED"))
! (oldseen (gnus-set-difference oldseentmp unseen))
! ;; oldseen might lack articles marked as read by other
! ;; imap clients! we correct this
! (newseen (imap-search "SEEN"))
! ;; ok, read articles are in oldseen+newseen (xxx lots of dupes)
! (seen (append oldseen newseen))
! ;; sort to have gnus-compress-sequence remove dupes
! (seens (sort seen '<))
! (read (gnus-compress-sequence seens t)))
! (if (and read
! (atom (car read)))
! (list (cons (car read) (car read))) ;; xxx not my bug
! read)))
! (mapc
! (lambda (mark-search)
! (if (and (memq (cdr mark-search) (imap-folder-get 'list-flags))
! (nnimap-flag-permanent-p mark-search group))
! (gnus-info-set-marks
! info
! (nnimap-update-alist-soft (car mark-search)
! (gnus-compress-sequence
! (imap-search (cdr mark-search)))
! (gnus-info-marks info)))))
! nnimap-mark-to-predicate-alist)))
! info)
;;; Respond to articles with mail
(deffoo nnimap-request-type (group article)
'mail)
(defun nnimap-split-copy-delete-article (article group to-group)
+ "Move article ARTICLE from group GROUP on current server to group TO-GROUP."
(when (nnimap-ok-p (nnimap-send-command-wait
(format "UID COPY %d %s" article to-group)))
! (setq nnimap-need-expunge t)
! (if (imap-store-flags-add (format "%d" article) "\\Seen \\Deleted")
! (message "IMAP split: moved %s:%d to %s" group article to-group)
! (error "IMAP flag store failed: you may have unread mail marked as read!"))))
(defun nnimap-split-move-article (article group to-group)
(when to-group
***************
*** 857,896 ****
(message "Could not create mailbox %s: %s"
to-group imap-last-status)))))
- ;; doesn't use COPY but instead FETCH+APPEND. Slower.
- (defun nnimap-split--move-article (article group to-group)
- (when to-group
- (message "IMAP split: moving %s:%d to %s" group article to-group)
-
- ;; mailbox exist? create it or bail out
- (with-current-buffer nnimap-server-buffer (setq imap-data-folder [0]))
- (when (and (nnimap-ok-p (nnimap-send-command-wait
- (concat "LIST \"\" " to-group)
- nnimap-server-buffer))
- (if (imap-folder-get 'delimiter to-group
- nnimap-server-buffer)
- t
- (if (nnimap-ok-p (nnimap-send-command-wait
- (concat "CREATE " to-group)
- nnimap-server-buffer))
- t
- (progn
- (message "Couldn't create group %s, leaving article in %s"
- to-group group)
- nil))))
- ;; ok, group exist, move article
- (unless (nnimap-request-move-article
- article group nil
- (list 'nnimap-request-accept-article to-group))
- (message "Couldn't move article %s:%d to %s" group article to-group)
- ;; remove Seen flag on article -- request-move-article fetches
- ;; the whole article, which set's this flag. Bad.
- (unless (nnimap-ok-p
- (nnimap-send-command-wait
- (format "UID STORE %d -FLAGS.SILENT \\Seen" article)))
- ;; serious damage
- (error "Couldn't remove Seen flag on article %s:%d (you might have unread mail flagged as read!)" group article))))))
-
;; tries to match all rules in nnimap-split-rule against content of
;; nntp-server-buffer, returns a list of groups that matched.
(defun nnimap-split-to-groups (rule)
--- 804,809 ----
***************
*** 913,919 ****
nnimap-split-inbox
(list nnimap-split-inbox)))
- ;; 47
(defun nnimap-split-articles (&optional group server)
(when (nnimap-possibly-change-server server)
(with-current-buffer nnimap-server-buffer
--- 826,831 ----
***************
*** 940,949 ****
(nnimap-split-move-article article inbox
(car groups))))))))
(when (imap-select-folder inbox) ;; just in case
! ;; todo: only remove splitted articles
! ;; use UID EXPUNGE, unfortunely not in the standard :-(
! (nnimap-send-command-wait "EXPUNGE") ;; debug: to get tagged data
! (imap-expunge-close-folder)))
t))))
;; nnimap-request-scan doesn't need to do anything. the delivery agent
--- 852,859 ----
(nnimap-split-move-article article inbox
(car groups))))))))
(when (imap-select-folder inbox) ;; just in case
! ;; todo: UID EXPUNGE (if available) to remove splitted articles
! (nnimap-expunge-close-group)))
t))))
;; nnimap-request-scan doesn't need to do anything. the delivery agent
***************
*** 975,1011 ****
(with-current-buffer nntp-server-buffer
(erase-buffer))
t))
-
- ;; (deffoo nnimap-request-update-mark (group article mark)
! ;;; Maybe we should add to current group-alist???
(deffoo nnimap-request-create-group (group &optional server args)
(when (nnimap-possibly-change-server server)
(nnimap-ok-p (nnimap-send-command-wait
(concat "CREATE " group)
nnimap-server-buffer))))
! ;;; Notice that we don't actually delete anything, we just mark them
! ;;; deleted. We need some kind of EXPUNGE command. Also, when we
! ;;; expunge we delete all marked \Deleted articles. So we either
! ;;; need to unmark,expunge,re-mark or come up with some new scheme.
! ;;; I guess force means delete, not force means expire. We don't to
! ;;; any expiry currently.
! ;;; Also, we can search for articles older than some expiry time if
! ;;; we need to. I'm not sure what to do.
(deffoo nnimap-request-expire-articles (articles group &optional server force)
! (when force
(when (nnimap-possibly-change-group group server)
(with-current-buffer nnimap-server-buffer
! ;;; (setq deleted (imap-search "DELETED"))
! ;;; (nnimap-ok-p (nnimap-send-command-wait "EXPUNGE"))
! ;;; (setq articles (gnus-sorted-complement articles deleted)))))
! (when (nnimap-ok-p (nnimap-send-command-wait
! (concat "UID STORE "
! (nnimap-range-to-string
! (gnus-compress-sequence articles))
! " +FLAGS (\\Deleted)")))
! (setq articles nil)))))
;; return articles not deleted
articles)
--- 885,992 ----
(with-current-buffer nntp-server-buffer
(erase-buffer))
t))
! ;; todo: are there any other flags we should propagate to the server?
! (deffoo nnimap-request-update-mark (group article mark)
! (when (nnimap-possibly-change-group group)
! (with-current-buffer nnimap-server-buffer
! (let ((artstr (format "%d" article)))
! (cond ((eq mark gnus-unread-mark)
! ;; more stuff? less stuff?
! (imap-store-flags-del artstr "\\Seen \\Flagged \\Deleted gnus-expire gnus-killed"))
! ((eq mark gnus-ticked-mark)
! (imap-store-flags-add artstr "\\Seen \\Flagged"))
! ((eq mark gnus-dormant-mark)
! (imap-store-flags-add artstr "gnus-dormant"))
! ((eq mark gnus-del-mark)
! (imap-store-flags-add artstr "\\Seen"))
! ((eq mark gnus-read-mark)
! (imap-store-flags-add artstr "\\Seen"))
! ((eq mark gnus-expirable-mark)
! (imap-store-flags-add artstr "\\Seen gnus-expire"))
! ((eq mark gnus-killed-mark)
! (imap-store-flags-add artstr "gnus-killed"))
! ;((eq mark gnus-souped-mark) ??
! ;((eq mark gnus-kill-file-mark) ??
! ;((eq mark gnus-low-score-mark) ??
! ;((eq mark gnus-catchup-mark) ??
! ((eq mark gnus-replied-mark)
! (imap-store-flags-add artstr "\\Answered"))
! ((eq mark gnus-cached-mark)
! t)
! ((eq mark gnus-saved-mark)
! (imap-store-flags-add artstr "gnus-saved"))
! ;((eq mark gnus-ancient-mark) ??
! ;((eq mark gnus-sparse-mark) ??
! ;((eq mark gnus-canceled-mark) ??
! ;((eq mark gnus-duplicate-mark) ??
! ;((eq mark gnus-undownloaded-mark) ??
! ;((eq mark gnus-downloadable-mark) ??
! ;((eq mark gnus-unsendable-mark) ??
! ))))
! mark)
!
(deffoo nnimap-request-create-group (group &optional server args)
(when (nnimap-possibly-change-server server)
(nnimap-ok-p (nnimap-send-command-wait
(concat "CREATE " group)
nnimap-server-buffer))))
! (defun nnimap-time-substract (time1 time2)
! "Return TIME for TIME1 - TIME2."
! (let* ((ms (- (car time1) (car time2)))
! (ls (- (nth 1 time1) (nth 1 time2))))
! (if (< ls 0)
! (list (- ms 1) (+ (expt 2 16) ls))
! (list ms ls))))
!
! (defun nnimap-date-days-ago (daysago)
! "Return date, in format \"28-Aug-98\", for DAYSAGO days ago."
! (format-time-string "%d-%b-%y" (nnimap-time-substract
! (current-time)
! (nnmail-days-to-time daysago))))
!
! (defun nnimap-request-expire-articles-progress (num fetch data)
! (gnus-message 5 "Expiring; marking article %d for deletion..." num))
!
! ;;; Notice that we don't actually delete anything, we just mark them deleted.
(deffoo nnimap-request-expire-articles (articles group &optional server force)
! (let (oldarts (artseq (gnus-compress-sequence articles)))
(when (nnimap-possibly-change-group group server)
(with-current-buffer nnimap-server-buffer
! (if force
! ;; add delete flag to article
! (when (imap-store-flags-add (nnimap-range-to-string artseq)
! "\\Deleted")
! (setq nnimap-need-expunge t)
! (setq articles nil))
! (let ((days (or (and nnmail-expiry-wait-function
! (funcall nnmail-expiry-wait-function group))
! nnmail-expiry-wait)))
! (cond ((eq days 'immediate)
! ;; add delete flag to article
! (when (imap-store-flags-add (nnimap-range-to-string artseq)
! "\\Deleted")
! (setq nnimap-need-expunge t)
! (setq articles nil)))
! ((numberp days)
! ;; We should not search only gnus-expired articles,
! ;; Gnus makes sure request-expire-articles is called
! ;; with correct arguments. (with total-expire,
! ;; the articles won't have gnus-expire set but should
! ;; be expired)
! (setq oldarts (imap-search
! (format "UID %s NOT SINCE %s"
! (nnimap-range-to-string artseq)
! (nnimap-date-days-ago days))))
! (let ((imap-cb-fetch-hook
! 'nnimap-request-expire-articles-progress))
! (when (and oldarts (imap-store-flags-add
! (nnimap-range-to-string
! (gnus-compress-sequence oldarts))
! "\\Deleted"))
! (setq nnimap-need-expunge t)
! (setq articles nil))))))))))
;; return articles not deleted
articles)
***************
*** 1026,1036 ****
(nnimap-request-expire-articles (list article) group server t))
result)))
- ;;; todo:
- ;;; Maybe we should update the group-alist???
(deffoo nnimap-request-accept-article (group &optional server last)
(when (nnimap-possibly-change-server server)
! ;; The article will be appended as UIDNEXT
(when (or (memq 'UIDPLUS (imap-capability-get nnimap-server-buffer))
(nnimap-ok-p (nnimap-send-command-wait
(concat "STATUS " group " (UIDNEXT)")
--- 1007,1015 ----
(nnimap-request-expire-articles (list article) group server t))
result)))
(deffoo nnimap-request-accept-article (group &optional server last)
(when (nnimap-possibly-change-server server)
! ;; We assume article is appended as UIDNEXT if no UIDPLUS support.
(when (or (memq 'UIDPLUS (imap-capability-get nnimap-server-buffer))
(nnimap-ok-p (nnimap-send-command-wait
(concat "STATUS " group " (UIDNEXT)")
***************
*** 1049,1069 ****
nnimap-server-buffer))
(imap-folder-get 'appenduid nil
nnimap-server-buffer)
! (imap-folder-get 'UIDNEXT group
! nnimap-server-buffer)))))
(when high
(cons group high)))))))
;; (deffoo nnimap-request-replace-article -- IMAP does not support replacing
- ;;; Maybe we should remove from group-alist and unset if current group???
(deffoo nnimap-request-delete-group (group force &optional server)
(when (nnimap-possibly-change-server server)
(nnimap-ok-p (nnimap-send-command-wait
(concat "DELETE " group)
nnimap-server-buffer))))
- ;;; Maybe we should update the group-alist and current group???
(deffoo nnimap-request-rename-group (group new-name &optional server)
(when (nnimap-possibly-change-server server)
(when (string= "INBOX" group)
--- 1028,1046 ----
nnimap-server-buffer))
(imap-folder-get 'appenduid nil
nnimap-server-buffer)
! (imap-folder-get 'UIDNEXT group
! nnimap-server-buffer)))))
(when high
(cons group high)))))))
;; (deffoo nnimap-request-replace-article -- IMAP does not support replacing
(deffoo nnimap-request-delete-group (group force &optional server)
(when (nnimap-possibly-change-server server)
(nnimap-ok-p (nnimap-send-command-wait
(concat "DELETE " group)
nnimap-server-buffer))))
(deffoo nnimap-request-rename-group (group new-name &optional server)
(when (nnimap-possibly-change-server server)
(when (string= "INBOX" group)
***************
*** 1116,1121 ****
--- 1093,1118 ----
(nnheader-report 'nnimap (cdr status)))
(nnheader-report 'nnimap (format "IMAP Command Timed Out"))))
+ (defun nnimap-expunge-close-group (&optional server)
+ (when (and (nnimap-possibly-change-server server)
+ imap-current-folder)
+ (with-current-buffer nnimap-server-buffer
+ (cond ((eq nnimap-expunge-on-close 'always)
+ (when nnimap-need-expunge
+ (setq nnimap-need-expunge nil)
+ (imap-send-command "EXPUNGE"))
+ (imap-expunge-close-folder))
+ ((eq nnimap-expunge-on-close 'never)
+ (imap-unselect-folder))
+ ((eq nnimap-expunge-on-close 'ask)
+ (let ((deleted (imap-search "DELETED")))
+ (if (gnus-y-or-n-p (format "Expunge articles in group `%s'? "
+ imap-current-folder))
+ (and (nnimap-ok-p (nnimap-send-command-wait "EXPUNGE"))
+ (imap-expunge-close-folder))
+ (imap-unselect-folder)))))))
+ (not imap-current-folder))
+
(defun nnimap-possibly-change-server (server)
"Change to server SERVER if needed (open it if it's closed). If SERVER is
nil, change to current server."
***************
*** 1129,1135 ****
(when group
(let ((groupname (gnus-group-normally-qualified
'nnimap server group)))
! (when (imap-select-folder group nil
(gnus-ephemeral-group-p groupname))
;; check/set UIDVALIDITY
(let ((new-uid (imap-folder-get 'uidvalidity))
--- 1126,1135 ----
(when group
(let ((groupname (gnus-group-normally-qualified
'nnimap server group)))
! (if (and imap-current-folder
! (not (string= group imap-current-folder)))
! (nnimap-expunge-close-group))
! (when (imap-select-folder group nil
(gnus-ephemeral-group-p groupname))
;; check/set UIDVALIDITY
(let ((new-uid (imap-folder-get 'uidvalidity))
***************
*** 1145,1154 ****
new-uid)
(message "UIDVALIDITY clash. Old value `%s', new `%s'"
old-uid new-uid)
! (imap-unselect-folder group))))))))
imap-current-folder)))
! ;;; Other functions
(defun gnus-group-nnimap-expunge (group)
"Expunge deleted articles in current nnimap GROUP."
--- 1145,1154 ----
new-uid)
(message "UIDVALIDITY clash. Old value `%s', new `%s'"
old-uid new-uid)
! (imap-unselect-folder))))))))
imap-current-folder)))
! ;;; Gnus functions
(defun gnus-group-nnimap-expunge (group)
"Expunge deleted articles in current nnimap GROUP."
***************
*** 1162,1168 ****
(unless (eq 'nnimap (car (setq method (gnus-find-method-for-group group))))
(error "Expunging only available for nnimap groups"))
(when (nnimap-possibly-change-server (cadr method))
! (nnimap-send-command-wait "EXPUNGE"))))
(defun gnus-group-nnimap-edit-acl (group)
"Edit the Access Control List of current nnimap GROUP."
--- 1162,1168 ----
(unless (eq 'nnimap (car (setq method (gnus-find-method-for-group group))))
(error "Expunging only available for nnimap groups"))
(when (nnimap-possibly-change-server (cadr method))
! (nnimap-send-command-wait "EXPUNGE" nnimap-server-buffer))))
(defun gnus-group-nnimap-edit-acl (group)
"Edit the Access Control List of current nnimap GROUP."
***************
*** 1239,1245 ****
(eq 'NO (car status)))
(error "Can't set ACL: %s" (cadr status))))))))))))
! ;;; Glue
(defun nnimap-group-mode-hook ()
(define-key gnus-group-mode-map (if (fboundp 'kbd) (kbd "G l")
--- 1239,1245 ----
(eq 'NO (car status)))
(error "Can't set ACL: %s" (cadr status))))))))))))
! ;;; Gnus glue
(defun nnimap-group-mode-hook ()
(define-key gnus-group-mode-map (if (fboundp 'kbd) (kbd "G l")
Index: nnimap/nnimap.texi
diff -c /dev/null nnimap/nnimap.texi:1.7
*** /dev/null Mon Aug 31 06:04:04 1998
--- nnimap/nnimap.texi Sat Aug 29 09:53:47 1998
***************
*** 0 ****
--- 1,734 ----
+ \input texinfo @c -*-texinfo-*-
+ @c %**start of header
+ @setfilename nnimap.info
+ @settitle Installation, configuration and usage instructions for nnimap
+ @c %**end of header
+
+ @setchapternewpage odd
+ @paragraphindent 0
+
+ @set VERSION $Revision: 1.1 $
+ @set NNIMAP-VERSION 0.3.30
+
+ @ifinfo
+ This file documents nnimap, an Emacs Lisp package for accessing
+ Imap servers from GNUS.
+
+ Copyright 1998 Simon Josefsson, texinfo conversion by Martin Fouts
+
+ Permission is granted to make and distribute verbatim
+ copies of this manual provided the copyright notice and
+ this permission notice are preserved on all copies.
+
+ @ignore
+ Permission is granted to process this file through TeX
+ and print the results, provided the printed document
+ carries a copying permission notice identical to this
+ one except for the removal of this paragraph (this
+ paragraph not being relevant to the printed manual).
+
+ @end ignore
+ Permission is granted to copy and distribute modified
+ versions of this manual under the conditions for
+ verbatim copying, provided also that the sections
+ entitled ``Copying'' and ``GNU General Public License''
+ are included exactly as in the original, and provided
+ that the entire resulting derived work is distributed
+ under the terms of a permission notice identical to this
+ one.
+
+ Permission is granted to copy and distribute
+ translations of this manual into another language,
+ under the above conditions for modified versions,
+ except that this permission notice may be stated in a
+ translation approved by the Free Software Foundation.
+ @end ifinfo
+
+ @titlepage
+ @author by Simon Josefsson
+ @sp 10
+ @center @titlefont{Installation, configuration and usage instructions
+ for nnimap}
+ @vskip 0pt plus 1filll
+ Copyright @copyright{} 1998 Simon Josefsson, texinfo conversion by Martin Fouts
+ @end titlepage
+
+ @c <body link="#0000ee" text="#000000" bgcolor="#ffffff" alink="#ff0000" vlink="#551a8b">
+
+ @node Top, , , (dir)
+ @chapter Introduction
+
+ The intent of this document is to describe every aspect of nnimap at the
+ user level. This document corresponds to nnimap @value{NNIMAP-VERSION}.
+
+ To use nnimap, you should
+ @enumerate
+ @item
+ Join the mailing list (@pxref{mailinglist})
+ @item
+ Download, unpack and compile a recent version. (@pxref{download})
+ @item
+ Install that version in your @file{.emacs}. (@pxref{install})
+ @item
+ Configure it for your server and mailboxes. (@pxref{config})
+ @end enumerate
+
+ Once you've done that, you can use nnimap. (@pxref{using})
+
+ We've collected some neat tricks, several which aren't nnimap sepecific,
+ we've found useful when using nnimap. (@pxref{trix})
+
+ @ifinfo
+ @menu
+ * download:: Downloading, unpacking and compiling nnimap
+ * install:: Installing nnimap
+ * config:: Configuring nnimap
+ * using:: Using nnimap
+ * trix:: Neat tricks
+ * contributors:: Contributors
+ * concepts:: Concept Index
+ * variables:: Variable and Function Index
+ @end menu
+ @end ifinfo
+
+ @node mailinglist, , , Top
+ @section nnimap mailing list.
+ @cindex mailing list
+ To join the mailing list, send a message to
+ gnus-imap-request@@vic20.dzp.se. In the body of the message put
+ @example
+ subscribe
+ @end example
+
+ @node download, install, , Top
+ @chapter Downloading, unpacking and compiling nnimap
+ @cindex Downloading nnimap
+ @cindex Unpacking nnimap
+ @cindex Compiling nnimap
+ @cindex Getting nnimap
+
+ The latest version of this nnimap implementation is always available as
+ @url{http://vic20.dzp.se/gnus-imap/nnimap.tar.gz}@*
+
+ Download the archive and unpack it.
+
+ @example
+ $ tar xfz nnimap.tar.gz
+ @end example
+
+ This will create a directory @file{nnimap-@var{VER}/} which contain all
+ files. @var{VER} is the current version number.
+
+ Compile it by issuing the following commands:
+
+ @example
+ $ cd nnimap-@var{VER}
+ $ make
+ @end example
+
+ If you use XEmacs, use
+ @example
+ $ cd nnimap-@var{VER}
+ $ make EMACS=xemacs
+ @end example
+ instead.
+
+ @node install, config, download, Top
+ @chapter Installing nnimap
+ @cindex Installing nnimap
+
+ You now need to tell Emacs about nnimap. This is done by editing
+ @file{~/.emacs}. Put the following in the file:
+
+ @lisp
+ (setq load-path
+ (cons (expand-file-name "~/elisp/nnimap-@var{VER}") load-path))
+ (require 'nnimap)
+ @end lisp
+
+ Replace @file{~/elisp/nnimap-@var{VER}} with the directory name created
+ when you untared nnimap.
+
+ (You could put this in @file{~/.gnus} instead if you like.)
+
+ Fire up Gnus and you should be able to tinker with nnimap in the server
+ buffer. If you aren't familiar with the server buffer, never mind you
+ wont miss anything. (Ok, ok, the excellent Gnus manual has a section on
+ the server buffer at
+ @url{http://www.gnus.org/manual/gnus_6.html#SEC130}
+ if you want to know.)
+
+ @node config, using, install, Top
+ @chapter Configuring nnimap
+ @cindex Configuring nnimap
+ @cindex Customizing nnimap
+ @vindex gnus-secondary-select-methods
+ @vindex gnus-select-method
+
+ To tell nnimap about your IMAP servers, you have to modify
+ @code{gnus-secondary-select-methods} (or maybe,
+ @code{gnus-select-method}) in your @file{~/.gnus}.
+
+ The following describes a situation where you would have a nnfolder
+ server (perhaps for storing old personal mail you don't want to store
+ online?) and two nnimap servers.
+
+ @lisp
+ (setq gnus-secondary-select-methods
+ '((nnfolder "")
+ (nnimap "dada"
+ (nnimap-server-address "cyrus.andrew.cmu.edu")
+ (nnimap-list-pattern ("INBOX" "archive.*")))
+ (nnimap "yoyo"
+ (nnimap-auth-method cram-md5)
+ (nnimap-server-address "your.mail.server"))))
+ @end lisp
+
+ The imap variables used above are described below:
+ @itemize @bullet
+ @item
+ @ref{config-server-address}.
+ @item
+ @ref{config-list-pattern}.
+ @item
+ @ref{config-auth-method}.
+ @end itemize
+
+ Now when Gnus starts, it will ask you for a username/password for each
+ IMAP server.
+
+ (For information about the cyrus public IMAP server, there is more
+ information at @url{http://andrew2.andrew.cmu.edu/cyrus/cyrustest.html}.)
+
+ @menu
+ * config-authinfo:: Automatic logins using ~/.authinfo
+ * config-server:: Server variables
+ * config-splitting:: Mail Splitting
+ * config-expiring:: Expiring Mail
+ * config-krb:: Required programs for kerberos
+ * config-ssl:: Required programs for ssl
+ @end menu
+
+ @node config-authinfo, config-server, , config
+ @section Automatic logins using ~/.authinfo
+ @cindex authinfo
+ @cindex Automatic logins using ~/.authinfo
+ @cindex Password configuration
+ @cindex Username configuration
+ @vindex nnimap-authinfo-file
+
+ Tired of telling nnimap about your username/password all the time? The
+ New and Improved Gnus, Gnus series 5.6.x that is, can do this for you.
+
+ Unfortunately, you still have to tell it your username/password
+ once. Whee, what a bugger. A bigger bugger (huh?) however is that you
+ have to store the password clear-text in a file. Depending on your level
+ of paranoia you may or may not want to do this.
+
+ Anyway, nnimap looks for a file @file{~/.authinfo}
+ (@code{nnimap-authinfo-file}) which contains the
+ username/password. This file follows the old "netrc" format.
+
+ Example @file{~/.authinfo} file:
+
+ @example
+ machine mail.server login arne password aDd12xX1
+ default login anonymous password arne@@domain.org
+ @end example
+
+ @node config-server, config-splitting, config-authinfo, config
+ @section Server variables
+ @cindex Server variables
+ @cindex Configuring the server(s)
+ @ifinfo
+ @menu
+ * config-server-address:: nnimap-server-address
+ * config-server-port:: nnimap-server-port
+ * config-list-method:: nnimap-list-method
+ * config-list-pattern:: nnimap-list-pattern
+ * config-auth-method:: nnimap-auth-method
+ @end menu
+ @end ifinfo
+
+
+ @node config-server-address, config-server-port, , config-server
+ @subsection @code{nnimap-server-address}
+ @cindex Server Address
+ @vindex nnimap-server-address
+
+ Hostname or IP address of IMAP server to use. Defaults to the Gnus
+ server name ("dada" and "yoyo" in the examples above) unless specified.
+
+ @node config-server-port, config-list-method, config-server-address, config-server
+ @subsection @code{nnimap-server-port}
+ @cindex Server port
+ @vindex nnimap-server-port
+
+ Port on server to contact. Defaults to 143.
+
+ @node config-list-method, config-list-pattern, config-server-port, config-server
+ @subsection @code{nnimap-list-method}
+ @cindex List method
+ @cindex Listing mailboxes
+ @vindex nnimap-list-pattern
+
+ When listing mailboxes on the server, the IMAP protocol has two
+ commands. "LIST", the default in nnimap, lists all mailboxes (limited by
+ @code{nnimap-list-pattern}). "LSUB" lists all subscribed
+ mailboxes.
+
+ Currently nnimap does not support server side subscribing/unsubscribing
+ so the natural choice is "LIST". However, if you have subscribed to
+ interesting mailboxes using another IMAP client you could take advantage
+ of this selection by telling nnimap to use it.
+
+ Example:
+
+ @lisp
+ (setq gnus-secondary-select-methods
+ '((nnimap "nana"
+ (nnimap-server-address "mail.server")
+ (nnimap-list-method "LSUB"))))
+ @end lisp
+
+ @node config-list-pattern, config-auth-method, config-list-method, config-server
+ @subsection @code{nnimap-list-pattern}
+ @cindex Finding mailboxes
+ @cindex Mailbox regexp
+ @cindex Seleting mailboxes
+ @vindex nnimap-list-pattern
+
+ String or list of strings of mailboxes to limit available groups
+ to. This has two uses.
+
+ First, as shown in the example, limiting the number of mailboxes you're
+ interested in on a server with very many mailboxes.
+
+ Secondly but related, if using the UW server you want to limit the
+ mailboxes to those in @file{~/Mail/*} for instance.
+
+ The string can also be a cons of REFERENCE and the string as above, what
+ REFERENCE is used for is server specific, but on the UWash server you
+ can specify the directory to use. Another example:
+
+ Example:
+
+ @lisp
+ (setq gnus-secondary-select-methods
+ '((nnimap "nana"
+ (nnimap-server-address "mail.server")
+ (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*" ("~friend/Mail/" . "list/*"))))))
+ @end lisp
+
+ @c <!--
+ @c <p>Some reports indicate that MS Exchange also requires a REFERENCE value, the semantic is unknown but it didn't work with a nil reference (no groups were returned on LIST). Try this:
+ @c
+ @c <p>@code{("*" . "*")}
+ @c
+ @c -->
+
+ @node config-auth-method, , config-list-pattern, config-server
+ @subsection @code{nnimap-auth-method}
+ @cindex Authorization method
+ @vindex nnimap-auth-method
+
+ This server variable let's you change the login scheme used for the server.
+
+ Valid options are:
+
+ @itemize @bullet
+ @item
+ @dfn{smart:} Try to figure out which scheme we should use. Currently
+ this cannot deal with kerberos and ssl, but it will choose CRAM MD5 over
+ plain text passwords.
+ @item
+ @dfn{login:} Force plain text password LOGIN.
+ @item
+ @dfn{cram-md5:} Force CRAM MD5 authentication. @strong{Note!} Requires
+ (X)Emacs 20.x.
+ @item
+ @dfn{kerberos4:} Force KERBEROS_V4 authentication. @xref{config-krb}
+ @item
+ @dfn{ssl:} Force SSL encryption. @xref{config-ssl}.
+ @end itemize
+
+ Example:
+
+ @lisp
+ (setq gnus-secondary-select-methods
+ '((nnimap "nana"
+ (nnimap-server-address "mail.server")
+ (nnimap-auth-method kerberos4))))
+ @end lisp
+
+ @node config-splitting, config-expiring, config-server, config
+ @section Splitting Mail
+ @cindex Configuring splitting
+ @cindex splitting
+ @cindex mail splitting
+
+ Splitting is something Gnus users has loved and used for years, and now
+ the rest of the world is catching up. Yeah, dream on, not many IMAP
+ server has server side splitting and those that have splitting seem to
+ use some non-standard protocol. This means that IMAP support for Gnus
+ has to do it's own splitting.
+
+ And it does.
+
+ There are three variables of interest:
+
+ @menu
+ * split-crosspost:: nnimap-split-crosspost
+ * split-inbox:: nnimap-split-inbox
+ * split-rule:: nnimap-split-rule
+ @end menu
+
+ @node split-crosspost, split-inbox, , config-splitting
+ @subsection @code{nnimap-split-crosspost}
+ @cindex splitting, crosspost
+ @cindex crosspost
+ @vindex nnimap-split-crosspost
+
+ If non-nil, do crossposting if several split methods match the mail. If
+ nil, the first match in @code{nnimap-split-rule} found will be used.
+
+ @lisp
+ (setq nnimap-split-crosspost t)
+ @end lisp
+
+ Nnmail equivalent: @code{nnmail-crosspost}.
+
+ @node split-inbox, split-rule, split-crosspost, config-splitting
+ @subsection @code{nnimap-split-inbox}
+ @cindex splitting, inbox
+ @cindex inbox
+ @vindex nnimap-split-inbox
+
+ A string or a list of strings that gives the name(s) of IMAP mailboxes
+ to read mail from and split according the the split rule. Defaults to
+ nil, which means that splitting is disabled!
+
+ @lisp
+ (setq nnimap-split-inbox '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
+ @end lisp
+
+ No nnmail equivalent.
+
+ @node split-rule, , split-inbox, config-splitting
+ @subsection @code{nnimap-split-rule}
+ @cindex Splitting, rules
+ @vindex nnimap-split-rule
+
+ New mail found in @code{nnimap-split-inbox} will be split
+ according to this variable.
+
+ This variable contains a list of lists, where the first element in the
+ sublist gives the name of the IMAP mailbox to move articles matching the
+ regexp in the second element in the sublist. Got that? Neither did I, we
+ need examples.
+
+ @lisp
+ (setq nnimap-split-rule
+ '(("INBOX.gnus-imap" "^Sender: owner-gnus-imap@@vic20.dzp.se")
+ ("INBOX.spam" "^Subject:.*MAKE MONEY")
+ ("INBOX.private" "")))
+ @end lisp
+
+ This will put all articles from the gnus-imap mailing list into the IMAP
+ mailbox INBOX.gnus-imap, all articles containing MAKE MONEY in the
+ Subject: line in INBOX.spam and everything else in INBOX.private.
+
+ It's probably a very good idea to have a empty regexp as the last entry
+ has in the example, this will clear the incoming mailbox from mail that
+ otherwise would be subject to the splitting process every time you start
+ Gnus.
+
+ The splitting code tries to create mailboxes if it has too.
+
+ Nnmail (semi-)equivalent: @code{nnmail-split-methods}.
+
+ @node config-expiring, config-krb, config-splitting, config
+ @section Expiring Mail
+ @cindex expiring
+ @vindex gnus-auto-expirable-newsgroups
+ @vindex nnmail-expiry-wait
+ @vindex nnmail-expiry-wait-function
+ @vindex auto-expire
+ @vindex total-expire
+ @vindex expire-wait
+
+ Expiring in nnimap works just like it does in the nnmail backends.
+
+ That is, you either mark articles for expiring manually, or use
+ @code{gnus-auto-expirable-newsgroups} variable, or the
+ @code{auto-expire}, @code{total-expire} group parameters (or any other
+ way you can think of).
+
+ To hopefully not confuse things (but possibly confuse things further),
+ nnimap has decided to use @code{nnmail-expiry-wait} and
+ @code{nnmail-expiry-wait-function} variables for configuring the
+ expiring process, so you would only need to tinker with the
+ @code{gnus-auto-expirable-newsgroups} regexp to include nnimap folders,
+ or set the @code{auto-expire}, @code{total-expire} group parameters on
+ nnimap folders to enable expiring.
+
+ (The reasoning behind the decision to use nnmail variables is that these
+ variables are set by the @code{expiry-wait} group parameter.)
+
+ @node config-krb, config-ssl, config-expiring, config
+ @section Required programs for kerberos
+ @cindex kerberos
+ @cindex using kerberos
+ @cindex Authentication, kerberos
+ @pindex imtest
+
+ For Kerberos authentication and encryption you need to have the external
+ program @code{imtest} which comes with Cyrus IMAPD
+ (@url{http://andrew2.andrew.cmu.edu/cyrus/}) in your path.
+
+ @node config-ssl, , config-krb, config
+ @section Required programs for ssl
+ @cindex ssl
+ @cindex using ssl
+ @cindex Authentication, kerberos
+ @pindex s_client
+
+ For SSL encryption you need to have the external program @code{s_client},
+ which comes with SSLeay (@url{http://www.ssleay.org/},) in your path.
+
+ @strong{Note} If you get SSL to work, please send me a note! I have not
+ been able to verify that this work.
+
+ @node using, trix, config, Top
+ @chapter Using nnimap
+ @cindex using nnimap
+ @cindex running nnimap
+ @findex gnus-group-unsubscribe-group
+ @kindex U
+ @kindex Meta-g
+ @kindex g
+ @kindex Meta-g
+
+ So now what? You've started your Gnus, and there is nothing other than
+ all those mail you keep telling yourself you will read tomorrow? No
+ free beers, no world peace, no nothing. Ahem, afraid so, it's scheduled
+ to be in version 1.0 though.
+
+ To access IMAP mailboxes you need to subscribe to them. Use 'U'
+ (@code{gnus-group-unsubscribe-group}) in the Group buffer and use
+ command completion to show what mailboxes are available. If you want to
+ subscribe to many mailboxes or want a somewhat fancier look of your
+ mailboxes, you should really learn how to use the server buffer,
+ (@xref{install}.)
+
+ After subscribing to one or more mailboxes you found interesting Gnus
+ will show that you haven't read any mail at all in that group. Gnus is
+ only guessing the first time, so press @kbd{Meta-g} on the group
+ (in the group buffer) to force a new mail fetch (which also updates all
+ marks).
+
+ Even after @kbd{g} (or @kbd{Meta-g}), Gnus may show that you have an
+ enormous amount of unread mail in that group. This is because Gnus is
+ only making an estimate of how many articles are in group, and it makes
+ this estimate by calculating HIGH-LOW+1, where HIGH is the article
+ number of the latest article and LOW is article number of the oldest
+ article. To possibly correct this, enter (SPC or RET) and exit the group
+ ('q'). This will mark all nonexistent articles as read (an oddity in
+ Gnus, you don't want to know). There could still be problems, currently
+ you'll have to live with this. Please report what server you are using
+ and exactly what problems you see, so I'm aware if this is a big problem
+ for many people.
+
+ That's it. You should now be able to use the group as any other group.
+
+ @menu
+ * using-acl:: Editing ACLs
+ @end menu
+
+ @node using-acl, , , using
+ @section Editing ACLs
+ @cindex Access Control Lists
+ @cindex Editing ACLs
+ @kindex H l
+ @findex gnus-group-edit-nnimap-acl
+
+ ACL stands for Access Control List. ACLs are used for limiting (or
+ enabling) other users access to your mail boxes. Not all server support
+ this, you'll find out if your server does when you try to use this
+ function.
+
+ To edit a group's ACL, move the cursor in the Group buffer to a nnimap
+ Group and type @kbd{H l} (@code{gnus-group-edit-nnimap-acl}) to have it
+ jump to the ACL editor. The instructions presented in that buffer should
+ get you going.
+
+ Some possible uses:
+
+ @itemize @bullet
+ @item
+ Giving "anyone" the "lrs" rights (lookup, read, keep seen/unseen flags)
+ on your mailing list mailboxes enables other users on the same server to
+ follow the list without subscribing to it.
+ @item
+ At least with the Cyrus server, you are required to give the user
+ "anyone" posting ("p") capabilities to have "plussing" work (that is,
+ mail sent to user+mailbox@@domain ending up in the IMAP mailbox
+ INBOX.mailbox).
+ @end itemize
+
+ @node trix, contributors, using, Top
+ @chapter Neat tricks
+ @ifinfo
+ @menu
+ * trix-verbose:: Getting verbose information
+ * trix-summary:: Showing article length in the summary buffer
+ * trix-caching:: Article caching
+ * trix-portfwd:: Authinfo logins against multi-port servers
+ @end menu
+ @end ifinfo
+
+ @node trix-verbose, trix-summary, , trix
+ @section Getting verbose information
+ @cindex Getting verbose information
+ @cindex debugging nnimap
+ @vindex gnus-verbose
+
+ You want something to watch while you wait for nnimap to do it's work?
+
+ @lisp
+ (setq gnus-verbose 9)
+ @end lisp
+
+ You could try 10 too, then you will see every IMAP command sent to the
+ server. A little bit too noisy IMHO.
+
+ The default is 7.
+
+ @node trix-summary, trix-caching, trix-verbose, trix
+ @section Showing article length in the summary buffer
+ @cindex Showing article length in the summary buffer
+ @cindex article length, octets
+ @cindex summary buffer length
+ @vindex gnus-summary-line-format
+
+ The number of lines are showed in the summary buffer, yes, but the octet
+ count can be interesting too. I use the following:
+
+ @lisp
+ (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-20,20n%]%) (%c) %s\n")
+ @end lisp
+
+ I've added the @code{ (%c)} part at the end of the string.
+
+ @node trix-caching, trix-portfwd, trix-summary, trix
+ @section Article caching
+ @cindex Article caching
+ @cindex caching
+ @vindex gnus-use-cache
+ @vindex gnus-cache-enter-articles
+ @vindex gnus-cache-remove-articles
+ @vindex gnus-cacheable-groups
+
+ Are you using nnimap from home, over a dialup connection? Then maybe
+ "Article Caching", another Gnus feature, is for you.
+
+ You should really read the
+ Gnus manual on
+ Article Caching to get the whole picture,
+ (at @url{"http://www.gnus.org/manual/gnus_3.html#SEC76},)
+ but here is a simple setup
+ for your convenience:
+
+ @lisp
+ (setq gnus-use-cache t)
+ (setq gnus-cache-directory "~/Mail/cache/")
+ (setq gnus-cache-enter-articles '(ticked dormant read unread))
+ (setq gnus-cache-remove-articles nil)
+ (setq gnus-cacheable-groups "^nnimap")
+ @end lisp
+
+ @node trix-portfwd, , trix-caching, trix
+ @section Authinfo logins against multi-port servers
+ @cindex authinfo logins against multi-port servers
+ @cindex multiple servers
+ @cindex servers, multiple
+ @cindex anonymous
+ @vindex gnus-secondary-select-methods
+
+ Scenario: You want to connect to multiple IMAP servers. You've seen the
+ X Files so you can't trust anyone. After a little work you've written
+ your own privacy/encryption suite. Using it, you've securely forwarded
+ the connections to your IMAP servers and have them available on
+ @code{localhost:4711}, @code{localhost:4712}, @code{localhost:4713} and
+ so on.
+
+ So what's the problem? Just add them to your
+ @code{gnus-secondary-select-method} just as any other servers. But of
+ course, this works.
+
+ However, if you want to use automatic logins using a @file{~/.authinfo}
+ file you'll find out that this file format doesn't support multiple
+ services on the same host. @xref{config-authinfo}
+
+ Nnimap has solved this problem by letting you use, instead of the server
+ address, the virtual Gnus server name when specifying username/passwords
+ in the authinfo file. I think a example will tell you what you need to
+ do:
+
+ Example, @file{~/.authinfo} file:
+
+ @example
+ machine server1 login user1 password pw1
+ machine server2 login user2 password pw2
+ machine server3 login user3 password pw3
+ machine server4 login anonymous password foo@@bar.org
+ @end example
+
+ And your @file{~/.gnus} would contain something like:
+
+ @lisp
+ (setq gnus-secondary-select-methods
+ '((nnimap "server1"
+ (nnimap-server-address "localhost")
+ (nnimap-server-port 4711))
+ (nnimap "server2"
+ (nnimap-server-address "localhost")
+ (nnimap-server-port 4712))
+ (nnimap "server3"
+ (nnimap-auth-method 'md5)
+ (nnimap-server-address "localhost")
+ (nnimap-server-port 4713))
+ (nnimap "server4"
+ (nnimap-server-address "localhost"))
+ (nnimap-server-port 4713)))
+ @end lisp
+
+ Note also that in this example you have two server connections open to
+ localhost:4713, one as user3 with CRAM-MD5 logins and one anonymous
+ login using the auto-detect login method.
+
+ Now you should be able to connect to your IMAP server securely to read
+ your mail, which, by the way, has been sent in clear-text through the
+ entire internet.
+
+ @node contributors, concepts, trix, Top
+ @chapter Contributors
+
+ Numerous people have helped the nnimap project, here I list people who
+ has written code, sent bug reports and other things. Apologies to
+ everybody I've forgotten.
+
+ John Prevost, Jim Radford, Simon Josefsson, Marty Fouts, Jake Colman.
+
+ @node concepts, variables, contributors, Top
+ @unnumbered Concept Index
+ @printindex cp
+
+ @node variables, , concepts, Top
+ @unnumbered Variable and Function Index
+ @syncodeindex fn vr
+ @printindex vr
+
+ @contents
+
+ @bye