+2000-07-16 18:25:07 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * nndoc.el (nndoc-type-alist): Add outlook.
+ (nndoc-outlook-type-p): New function.
+ (nndoc-outlook-article-begin): Ditto.
+
+2000-07-16 Daiki Ueno <ueno@unixuser.org>
+
+ * gnus-sum.el (gnus-restore-hidden-threads-configuration): Save
+ excursion.
+
+2000-07-15 Simon Josefsson <simon@josefsson.org>
+
+ * gnus-cus.el (gnus-group-parameters, banner): Type is regexp.
+
+ * imap.el (imap):
+ (imap-kerberos4-program):
+ (imap-gssapi-program):
+ (imap-ssl-program): Customization.
+ (imap-shell-program):
+ (imap-shell-host): New variables.
+ (imap-streams):
+ (imap-stream-alist): Add shell.
+ (imap-shell-p):
+ (imap-shell-open): New functions.
+ (imap-open): Don't call authenticator if preauth.
+ (imap-authenticate): Return t if already authenticated.
+
+2000-07-14 Simon Josefsson <simon@josefsson.org>
+
+ * gnus.el (gnus-invalid-group-regexp): New variable.
+ (gnus-read-group): Use it.
+
+2000-07-14 12:40:51 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-agent.el (gnus-agent-fetch-group-1): mark-below,
+ expunge-below and orphan-score are "group variables".
+
2000-07-13 Simon Josefsson <jas@pdc.kth.se>
* gnus-srvr.el (gnus-browse-read-group): Don't pass fully
gnus-newsgroup-dependencies gnus-newsgroup-headers
gnus-newsgroup-scored gnus-headers gnus-score
gnus-use-cache articles arts
- category predicate info marks score-param)
+ category predicate info marks score-param
+ (gnus-summary-expunge-below gnus-summary-expunge-below)
+ (gnus-summary-mark-below gnus-summary-mark-below)
+ (gnus-orphan-score gnus-orphan-score)
+ ;; Maybe some other gnus-summary local variables should also
+ ;; be put here.
+ )
(unless (gnus-check-group group)
(error "Can't open server for %s" group))
;; Fetch headers.
(banner (choice :tag "Banner"
(const signature)
- string
+ regexp
(const :tag "None" nil)) "\
-Banner to be removed from articles.")
+Regular expression matching banners to be removed from articles.")
(auto-expire (const :tag "Automatic Expire" t) "\
All articles that are read will be marked as expirable.")
(defun gnus-restore-hidden-threads-configuration (config)
"Restore hidden threads configuration from CONFIG."
- (let (point buffer-read-only)
- (while (setq point (pop config))
- (when (and (< point (point-max))
- (goto-char point)
- (eq (char-after) ?\n))
- (subst-char-in-region point (1+ point) ?\n ?\r)))))
+ (save-excursion
+ (let (point buffer-read-only)
+ (while (setq point (pop config))
+ (when (and (< point (point-max))
+ (goto-char point)
+ (eq (char-after) ?\n))
+ (subst-char-in-region point (1+ point) ?\n ?\r))))))
;; Various summary mode internalish functions.
use the article treating faculties instead. Is is described in Info node
`Customizing Articles'.")
+(defvar gnus-invalid-group-regexp "[: `'\"/]\\|^$"
+ "Regexp matching invalid groups.")
+
;;; End of variables.
;; Define some autoload functions Gnus might use.
(let ((prefix "")
group)
(while (not group)
- (when (string-match
- "[: `'\"/]\\|^$"
+ (when (string-match
+ gnus-invalid-group-regexp
(setq group (read-string (concat prefix prompt)
(cons (or default "") 0)
'gnus-group-history)))
;; User variables.
-(defvar imap-kerberos4-program '("imtest -m kerberos_v4 -u %l -p %p %s"
- "imtest -kp %s %p")
+(defgroup imap nil
+ "Low-level IMAP issues."
+ :group 'mail)
+
+(defcustom imap-kerberos4-program '("imtest -m kerberos_v4 -u %l -p %p %s"
+ "imtest -kp %s %p")
"List of strings containing commands for Kerberos 4 authentication.
%s is replaced with server hostname, %p with port to connect to, and
%l with the value of `imap-default-user'. The program should accept
-IMAP commands on stdin and return responses to stdout.")
+IMAP commands on stdin and return responses to stdout. Each entry in
+the list is tried until a successful connection is made."
+ :group 'imap
+ :type '(repeat string))
-(defvar imap-gssapi-program '("imtest -m gssapi -u %l -p %p %s")
+(defcustom imap-gssapi-program '("imtest -m gssapi -u %l -p %p %s")
"List of strings containing commands for GSSAPI (krb5) authentication.
%s is replaced with server hostname, %p with port to connect to, and
%l with the value of `imap-default-user'. The program should accept
-IMAP commands on stdin and return responses to stdout.")
-
-(defvar imap-ssl-program '("openssl s_client -ssl3 -connect %s:%p"
- "openssl s_client -ssl2 -connect %s:%p"
- "s_client -ssl3 -connect %s:%p"
- "s_client -ssl2 -connect %s:%p")
+IMAP commands on stdin and return responses to stdout. Each entry in
+the list is tried until a successful connection is made."
+ :group 'imap
+ :type '(repeat string))
+
+(defcustom imap-ssl-program '("openssl s_client -ssl3 -connect %s:%p"
+ "openssl s_client -ssl2 -connect %s:%p"
+ "s_client -ssl3 -connect %s:%p"
+ "s_client -ssl2 -connect %s:%p")
"A string, or list of strings, containing commands for SSL connections.
Within a string, %s is replaced with the server address and %p with
port number on server. The program should accept IMAP commands on
-stdin and return responses to stdout.")
+stdin and return responses to stdout. Each entry in the list is tried
+until a successful connection is made."
+ :group 'imap
+ :type '(choice string
+ (repeat string)))
+
+(defcustom imap-shell-program '("ssh %s imapd"
+ "rsh %s imapd"
+ "ssh %g ssh %s imapd"
+ "rsh %g rsh %s imapd")
+ "A list of strings, containing commands for IMAP connection.
+Within a string, %s is replaced with the server address, %p with port
+number on server, %g with `imap-shell-host', and %l with
+`imap-default-user'. The program should read IMAP commands from stdin
+and write IMAP response to stdout. Each entry in the list is tried
+until a successful connection is made."
+ :group 'imap
+ :type '(repeat string))
+
+(defvar imap-shell-host "gateway"
+ "Hostname of rlogin proxy.")
(defvar imap-default-user (user-login-name)
"Default username to use.")
(defvar imap-fetch-data-hook nil
"Hooks called after receiving each FETCH response.")
-(defvar imap-streams '(gssapi kerberos4 starttls ssl network)
+(defvar imap-streams '(gssapi kerberos4 starttls ssl network shell)
"Priority of streams to consider when opening connection to server.")
(defvar imap-stream-alist
(kerberos4 imap-kerberos4-stream-p imap-kerberos4-open)
(ssl imap-ssl-p imap-ssl-open)
(network imap-network-p imap-network-open)
+ (shell imap-shell-p imap-shell-open)
(starttls imap-starttls-p imap-starttls-open))
"Definition of network streams.
(when (memq (process-status process) '(open run))
process))))
+(defun imap-shell-p (buffer)
+ nil)
+
+(defun imap-shell-open (name buffer server port)
+ (let ((cmds imap-shell-program)
+ cmd done)
+ (while (and (not done) (setq cmd (pop cmds)))
+ (message "imap: Opening IMAP connection with `%s'..." cmd)
+ (setq imap-client-eol "\n")
+ (let* ((port (or port imap-default-port))
+ (process (as-binary-process
+ (start-process
+ name buffer shell-file-name shell-command-switch
+ (format-spec
+ cmd
+ (format-spec-make
+ ?s server
+ ?g imap-shell-host
+ ?p (number-to-string port)
+ ?l imap-default-user))))))
+ (when process
+ (while (and (memq (process-status process) '(open run))
+ (goto-char (point-min))
+ (not (imap-parse-greeting)))
+ (accept-process-output process 1)
+ (sit-for 1))
+ (erase-buffer)
+ (and imap-log
+ (with-current-buffer (get-buffer-create imap-log)
+ (buffer-disable-undo)
+ (goto-char (point-max))
+ (insert-buffer-substring buffer)))
+ (when (memq (process-status process) '(open run))
+ (setq done process)))))
+ (if done
+ (progn
+ (message "imap: Opening IMAP connection with `%s'...done" cmd)
+ done)
+ (message "imap: Failed opening IMAP connection")
+ nil)))
+
(defun imap-starttls-p (buffer)
(and (condition-case ()
(require 'starttls)
(setq imap-capability nil)))
(if (imap-opened buffer)
;; Choose authenticator
- (when (null imap-auth)
+ (when (and (null imap-auth) (not (eq imap-state 'auth)))
(let ((auths imap-authenticators))
(while (setq auth (pop auths))
(if (funcall (nth 1 (assq auth imap-authenticator-alist))
specified, the user will not be questioned and the username and/or
password is remembered in the buffer."
(with-current-buffer (or buffer (current-buffer))
- (when (eq imap-state 'nonauth)
+ (if (not (eq imap-state 'nonauth))
+ (or (eq imap-state 'auth)
+ (eq imap-state 'select)
+ (eq imap-state 'examine))
(make-variable-buffer-local 'imap-username)
(make-variable-buffer-local 'imap-password)
(if user (setq imap-username user))
(rfc822-forward
(article-begin . "^\n")
(body-end-function . nndoc-rfc822-forward-body-end-function))
+ (outlook
+ (article-begin-function . nndoc-outlook-article-begin)
+ (body-end . "\0"))
(guess
(guess . t)
(subtype nil))
(when (looking-at "From - ")
t))
+(defun nndoc-outlook-article-begin ()
+ (prog1 (re-search-forward "From:\\|Received:" nil t)
+ (goto-char (match-beginning 0))))
+
+(defun nndoc-outlook-type-p ()
+ ;; FIXME: Is JMF the magic of outlook mailbox? -- ShengHuo.
+ (looking-at "JMF"))
+
(deffoo nndoc-request-accept-article (group &optional server last)
nil)
+2000-07-15 Simon Josefsson <simon@josefsson.org>
+
+ * gnus.texi (nnimap-authinfo-file):
+ (gnus-invalid-group-regexp): Add.
+ (Mail Source Specifiers): Fix.
+ (IMAP): Fix.
+ (Agent Basics): Fix.
+
2000-07-12 19:37:19 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus.texi (Article Washing): Add keystroke `t'.
\e$B%7%s%\%k$NCf$N$R$H$D$r@_Dj$7$^$9!#8=>u$G$O!"\e(B@samp{kerberos4} \e$B$+\e(B
@samp{ssl} \e$B$+=i4|CM$N\e(B @samp{network} \e$B$K$J$j$^$9!#\e(B
-@item :authenticator
+@item :authentication
\e$B%5!<%P!<$G$NG'>Z$K$I$NG'>ZK!$r;H$&$+!#$3$l$O\e(B
@code{imap-authenticator-alist} \e$B$N%7%s%\%k$N0l$D$r@_Dj$7$^$9!#8=>u$G$O!"\e(B
@samp{kerberos4}\e$B!"\e(B@samp{cram-md5}\e$B!"\e(B@samp{anonymous} \e$B$+=i4|CM$N\e(B
@dfn{ssl:} SSL \e$B$r;H$$$^$9!#\e(BOpenSSL (@samp{openssl} \e$B%W%m%0%i%`\e(B) \e$B$+\e(B SSLeay
(@samp{s_client}) \e$B$,I,MW$G$9!#\e(B
@item
+@dfn{shell:} \e$B%7%'%kL?Na$r;H$C$F\e(B IMAP \e$B@\B3$r3+;O$7$^$9!#\e(B
+@item
@dfn{network:} \e$B@8$N!"\e(BTCP/IP \e$B$N%M%C%H%o!<%/@\B3$G$9!#\e(B
@end itemize
+@vindex imap-kerberos4-program
@samp{imtest} \e$B%W%m%0%i%`$O\e(B Cyrus IMAPD \e$B$K4^$^$l$F$$$^$9!#\e(Bnnimap \e$B$O\e(B
-@samp{imtest} \e$B%P!<%8%g%s\e(B 1.5.x \e$B$H\e(B 1.6.x \e$B$NN>J}$r%5%]!<%H$7$^$9!#\e(B
+@samp{imtest} \e$B%P!<%8%g%s\e(B 1.5.x \e$B$H\e(B 1.6.x \e$B$NN>J}$r%5%]!<%H$7$^$9!#JQ?t\e(B
+@code{imap-kerberos4-program} \e$B$O\e(B imtest \e$B%W%m%0%i%`$KEO$9%Q%?%a!<%?$r4^$_\e(B
+\e$B$^$9!#\e(B
+@vindex imap-ssl-program
SSL \e$B@\B3$N$?$a$N\e(B OpenSSL \e$B%W%m%0%i%`$O\e(B @file{http://www.openssl.org/} \e$B$+\e(B
\e$B$iF~<j$G$-$^$9!#\e(BOpenSSL \e$B$O0JA0$O\e(B SSLeay \e$B$H$7$FCN$i$l$F$$$?$b$N$G!"\e(Bnnimap
\e$B$O$=$l$b%5%]!<%H$7$^$9!#$7$+$7!"\e(BSSLeay \e$B$N:G?7HG$G$"$k\e(B 0.9.x \e$B$K$O=EBg$J%P\e(B
\e$B%0$,$"$k$?$a;H$($^$;$s!#0JA0$NHG!"FC$K\e(B SSLeay 0.8.x \e$B$O;H$($k$3$H$,$o$+$C\e(B
-\e$B$F$$$^$9!#\e(B
+\e$B$F$$$^$9!#JQ?t\e(B @code{imap-ssl-program} \e$B$O\e(B OpenSSL/SSLeay \e$B$KEO$9%Q%?%a!<\e(B
+\e$B%?$r4^$_$^$9!#\e(B
+
+@vindex imap-shell-program
+@vindex imap-shell-host
+IMAP \e$B@\B3$K\e(B @code{shell} \e$B%9%H%j!<%`$r;H$&>l9g!"JQ?t\e(B
+@code{imap-shell-program} \e$B$O2?$N%W%m%0%i%`$r8F$V$+$r;XDj$7$^$9!#\e(B
@item nnimap-authenticator
@vindex nnimap-authenticator
@item ask
\e$B%a!<%k%\%C%/%9$rJD$8$k$H$-$K!"\e(Bnnimap \e$B$,>C5n$5$l$?5-;v$r:o=|$9$k$+$I$&$+\e(B
\e$B$r?R$M$^$9!#\e(B
+
+@item nnimap-authinfo-file
+@vindex nnimap-authinfo-file
+
+\e$B%5!<%P$K%m%0%$%s$9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%f!<%6$K%0%k!<%WL>$r3NG'$9$k$H$-$K;H$&!"\e(B``\e$B;H$($J$$\e(B'' \e$B%0%k!<%WL>$K%^%C%A\e(B
+\e$B$9$k@55,I=8=$G$9!#4{DjCM$O\e(B gnus \e$B$NFbItF0:n\e(B (\e$BA*BrJ}K!$H%0%k!<%W$N6-3&$K!"\e(B
+\e$BDL>o\e(B @samp{:} \e$B$r;H$C$F$$$k\e(B) \e$B$r$a$A$c$a$A$c$K$7$F$7$^$&$+$b$7$l$J$$!"$$$/\e(B
+\e$B$D$+$N\e(B @strong{\e$BK\Ev$K\e(B} \e$B;H$($J$$%0%k!<%WL>$rJa$^$($^$9!#\e(B
+
+IMAP \e$B%f!<%6$O%0%k!<%WL>$K\e(B @samp{/} \e$B$r;H$$$?$$$H;W$&$G$7$g$&$1$l$I!#\e(B
+
@end table
@end lisp
If the mail spool file is not located on the local machine, it's best to
-use POP or @sc{imap} or the like to fetch the mail. You can not you ange-ftp
+use POP or @sc{imap} or the like to fetch the mail. You can not use ange-ftp
file names here---it has no way to lock the mail spool while moving the
mail.
symbols in @code{imap-stream-alist}. Right now, this means
@samp{kerberos4}, @samp{ssl} or the default @samp{network}.
-@item :authenticator
+@item :authentication
Which authenticator to use for authenticating to the server, this is one
of the symbols in @code{imap-authenticator-alist}. Right now, this
means @samp{kerberos4}, @samp{cram-md5}, @samp{anonymous} or the default
@dfn{ssl:} Connect through SSL. Require OpenSSL (the
program @samp{openssl}) or SSLeay (@samp{s_client}).
@item
+@dfn{shell:} Use a shell command to start IMAP connection.
+@item
@dfn{network:} Plain, TCP/IP network connection.
@end itemize
+@vindex imap-kerberos4-program
The @samp{imtest} program is shipped with Cyrus IMAPD, nnimap support
-both @samp{imtest} version 1.5.x and version 1.6.x.
+both @samp{imtest} version 1.5.x and version 1.6.x. The variable
+@code{imap-kerberos4-program} contain parameters to pass to the imtest
+program.
+@vindex imap-ssl-program
For SSL connections, the OpenSSL program is available from
@file{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
-and nnimap support it too - although the most recent versions of SSLeay,
-0.9.x, are known to have serious bugs making it useless. Earlier
-versions, especially 0.8.x, of SSLeay are known to work.
+and nnimap support it too - although the most recent versions of
+SSLeay, 0.9.x, are known to have serious bugs making it
+useless. Earlier versions, especially 0.8.x, of SSLeay are known to
+work. The variable @code{imap-ssl-program} contain parameters to pass
+to OpenSSL/SSLeay.
+
+@vindex imap-shell-program
+@vindex imap-shell-host
+For IMAP connections using the @code{shell} stream, the variable
+@code{imap-shell-program} specify what program to call.
@item nnimap-authenticator
@vindex nnimap-authenticator
@item ask
When closing mailboxes, nnimap will ask if you wish to expunge deleted
articles or not.
+
+@item nnimap-authinfo-file
+@vindex nnimap-authinfo-file
+
+A file containing credentials used to log in on servers. The format
+is (almost) the same as the @code{ftp} @file{~/.netrc} file. See
+`nntp-authinfo-file' for exact syntax.
+
@end table
@end table
@item
You then decide to see whether any new news has arrived. You connect
your machine to the net (using PPP or whatever), and then hit @kbd{J j}
-to make Gnus become @dfn{plugged}.
+to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
+as usual.
@item
You can then read the new news immediately, or you can download the news
@vindex gnus-shell-command-separator
String used to separate two shell commands. The default is @samp{;}.
+@item gnus-invalid-group-regexp
+@vindex gnus-invalid-group-regexp
+
+Regexp to match ``invalid'' group names when querying user for a group
+name. The default value catches some @strong{really} invalid group
+names who could possibly mess up Gnus internally (like allowing
+@samp{:} in a group name, which is normally used to delimit method and
+group).
+
+IMAP users might want to allow @samp{/} in group names though.
+
@end table