comparison lisp/gnus/pop3.el @ 90614:8dd8c8286063

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 460-475) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 145-152) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-118
author Miles Bader <miles@gnu.org>
date Sun, 15 Oct 2006 02:54:13 +0000
parents a1a25ac6c88a aeb79612dc36
children 95d0cdf160ea
comparison
equal deleted inserted replaced
90613:7a2fdfcc7f71 90614:8dd8c8286063
73 (defvar pop3-password nil 73 (defvar pop3-password nil
74 "*Password to use when connecting to POP server.") 74 "*Password to use when connecting to POP server.")
75 75
76 (defcustom pop3-authentication-scheme 'pass 76 (defcustom pop3-authentication-scheme 'pass
77 "*POP3 authentication scheme. 77 "*POP3 authentication scheme.
78 Defaults to 'pass, for the standard USER/PASS authentication. Other valid 78 Defaults to `pass', for the standard USER/PASS authentication. The other
79 values are 'apop." 79 valid value is 'apop'."
80 :type '(choice (const :tag "Normal user/password" pass)
81 (const :tag "APOP" apop))
80 :version "22.1" ;; Oort Gnus 82 :version "22.1" ;; Oort Gnus
81 :type '(choice (const :tag "USER/PASS" pass)
82 (const :tag "APOP" apop))
83 :group 'pop3) 83 :group 'pop3)
84 84
85 (defcustom pop3-leave-mail-on-server nil 85 (defcustom pop3-leave-mail-on-server nil
86 "*Non-nil if the mail is to be left on the POP server after fetching. 86 "*Non-nil if the mail is to be left on the POP server after fetching.
87 87
88 If the `pop3-leave-mail-on-server' is non-`nil' the mail is to be 88 If `pop3-leave-mail-on-server' is non-nil the mail is to be left
89 left on the POP server after fetching. Note that POP servers 89 on the POP server after fetching. Note that POP servers maintain
90 maintain no state information between sessions, so what the 90 no state information between sessions, so what the client
91 client believes is there and what is actually there may not match 91 believes is there and what is actually there may not match up.
92 up. If they do not, then you may get duplicate mails or the 92 If they do not, then you may get duplicate mails or the whole
93 whole thing can fall apart and leave you with a corrupt mailbox." 93 thing can fall apart and leave you with a corrupt mailbox."
94 ;; We can't use the UILD support from XEmacs mail-lib or cvs.m17n.org: 94 ;; We can't use the UILD support from XEmacs mail-lib or cvs.m17n.org:
95 ;; http://thread.gmane.org/v9lld8fml4.fsf@marauder.physik.uni-ulm.de 95 ;; http://thread.gmane.org/v9lld8fml4.fsf@marauder.physik.uni-ulm.de
96 ;; http://thread.gmane.org/b9yy8hzy9ej.fsf@jpl.org 96 ;; http://thread.gmane.org/b9yy8hzy9ej.fsf@jpl.org
97 ;; Any volunteer to re-implement this? 97 ;; Any volunteer to re-implement this?
98 :version "22.1" ;; Oort Gnus 98 :version "22.1" ;; Oort Gnus
168 (forward-line 50) 168 (forward-line 50)
169 (delete-region (point-min) (point)))) 169 (delete-region (point-min) (point))))
170 (unless pop3-leave-mail-on-server 170 (unless pop3-leave-mail-on-server
171 (pop3-dele process n)) 171 (pop3-dele process n))
172 (setq n (+ 1 n)) 172 (setq n (+ 1 n))
173 (if pop3-debug (sit-for 1) (sit-for 0.1)) 173 (if pop3-debug (sit-for 1) (sit-for 0.1))) ; why?
174 ) 174 (when (and pop3-leave-mail-on-server
175 (> n 1))
176 (message "pop3.el doesn't support UIDL. Setting `pop3-leave-mail-on-server'
177 to %s might not give the result you'd expect." pop3-leave-mail-on-server)
178 (sit-for 1))
175 (pop3-quit process)) 179 (pop3-quit process))
176 (kill-buffer crashbuf) 180 (kill-buffer crashbuf))
177 )
178 t) 181 t)
179 182
180 (defun pop3-get-message-count () 183 (defun pop3-get-message-count ()
181 "Return the number of messages in the maildrop." 184 "Return the number of messages in the maildrop."
182 (let* ((process (pop3-open-server pop3-mailhost pop3-port)) 185 (let* ((process (pop3-open-server pop3-mailhost pop3-port))
314 ;; sample date formats I have seen 317 ;; sample date formats I have seen
315 ;; Date: Tue, 9 Jul 1996 09:04:21 -0400 (EDT) 318 ;; Date: Tue, 9 Jul 1996 09:04:21 -0400 (EDT)
316 ;; Date: 08 Jul 1996 23:22:24 -0400 319 ;; Date: 08 Jul 1996 23:22:24 -0400
317 ;; should be 320 ;; should be
318 ;; Tue Jul 9 09:04:21 1996 321 ;; Tue Jul 9 09:04:21 1996
322
323 ;; Fixme: This should use timezone on the date field contents.
319 (setq date 324 (setq date
320 (cond ((not date) 325 (cond ((not date)
321 "Tue Jan 1 00:00:0 1900") 326 "Tue Jan 1 00:00:0 1900")
322 ((string-match "[A-Z]" (nth 0 date)) 327 ((string-match "[A-Z]" (nth 0 date))
323 (format "%s %s %s %s %s" 328 (format "%s %s %s %s %s"