1 ;;; elmo-pop3.el -- POP3 Interface for ELMO.
3 ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
4 ;; Copyright (C) 1999,2000 Kenichi OKADA <okada@opaopa.org>
6 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
7 ;; Kenichi OKADA <okada@opaopa.org>
8 ;; Keywords: mail, net news
10 ;; This file is part of ELMO (Elisp Library for Message Orchestration).
12 ;; This program is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; This program is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
41 (autoload 'md5 "md5"))
43 (defvar elmo-pop3-exists-exactly t)
44 (defvar sasl-mechanism-alist)
46 (luna-define-class elmo-pop3-session (elmo-network-session))
49 (defvar elmo-pop3-read-point nil)
50 (defvar elmo-pop3-number-uidl-hash nil) ; number -> uidl
51 (defvar elmo-pop3-uidl-number-hash nil) ; uidl -> number
52 (defvar elmo-pop3-size-hash nil) ; number -> size
53 (defvar elmo-pop3-uidl-done nil)
54 (defvar elmo-pop3-list-done nil)
56 (defvar elmo-pop3-local-variables '(elmo-pop3-read-point
57 elmo-pop3-uidl-number-hash
58 elmo-pop3-number-uidl-hash
63 (luna-define-method elmo-network-close-session ((session elmo-pop3-session))
64 (when (elmo-network-session-process-internal session)
65 (when (memq (process-status
66 (elmo-network-session-process-internal session))
68 (elmo-pop3-send-command (elmo-network-session-process-internal session)
70 (or (elmo-pop3-read-response
71 (elmo-network-session-process-internal session) t)
72 (error "POP error: QUIT failed")))
73 (kill-buffer (process-buffer
74 (elmo-network-session-process-internal session)))
75 (delete-process (elmo-network-session-process-internal session))))
77 (defun elmo-pop3-get-session (spec &optional if-exists)
78 (elmo-network-get-session
81 (elmo-pop3-spec-hostname spec)
82 (elmo-pop3-spec-port spec)
83 (elmo-pop3-spec-username spec)
84 (elmo-pop3-spec-auth spec)
85 (elmo-pop3-spec-stream-type spec)
88 (defun elmo-pop3-send-command (process command &optional no-erase)
89 (with-current-buffer (process-buffer process)
92 (goto-char (point-min))
93 (setq elmo-pop3-read-point (point))
94 (process-send-string process command)
95 (process-send-string process "\r\n")))
97 (defun elmo-pop3-read-response (process &optional not-command)
98 (with-current-buffer (process-buffer process)
99 (let ((case-fold-search nil)
100 (response-string nil)
101 (response-continue t)
104 (while response-continue
105 (goto-char elmo-pop3-read-point)
106 (while (not (re-search-forward "\r?\n" nil t))
107 (accept-process-output process)
108 (goto-char elmo-pop3-read-point))
109 (setq match-end (point))
110 (setq response-string
111 (buffer-substring elmo-pop3-read-point (- match-end 2)))
112 (goto-char elmo-pop3-read-point)
113 (if (looking-at "\\+.*$")
115 (setq response-continue nil)
116 (setq elmo-pop3-read-point match-end)
119 (concat return-value "\n" response-string)
121 (if (looking-at "\\-.*$")
123 (setq response-continue nil)
124 (setq elmo-pop3-read-point match-end)
125 (setq return-value nil))
126 (setq elmo-pop3-read-point match-end)
128 (setq response-continue nil))
131 (concat return-value "\n" response-string)
133 (setq elmo-pop3-read-point match-end)))
136 (defun elmo-pop3-process-filter (process output)
138 (set-buffer (process-buffer process))
139 (goto-char (point-max))
141 (message "Retrieving...(%d bytes)." (buffer-size))))
143 (defun elmo-pop3-auth-user (session)
144 (let ((process (elmo-network-session-process-internal session)))
146 (elmo-pop3-send-command
148 (format "user %s" (elmo-network-session-user-internal session)))
149 (or (elmo-pop3-read-response process t)
150 (signal 'elmo-authenticate-error
151 '(elmo-pop-auth-user)))
152 (elmo-pop3-send-command process
156 (elmo-network-session-password-key session))))
157 (or (elmo-pop3-read-response process t)
158 (signal 'elmo-authenticate-error
159 '(elmo-pop-auth-user)))))
161 (defun elmo-pop3-auth-apop (session)
162 (if (string-match "^\+OK .*\\(<[^\>]+>\\)"
163 (elmo-network-session-greeting-internal session))
164 ;; good, APOP ready server
166 (elmo-pop3-send-command
167 (elmo-network-session-process-internal session)
169 (elmo-network-session-user-internal session)
171 (concat (match-string
173 (elmo-network-session-greeting-internal session))
175 (elmo-network-session-password-key session))))))
176 (or (elmo-pop3-read-response
177 (elmo-network-session-process-internal session)
179 (signal 'elmo-authenticate-error
180 '(elmo-pop3-auth-apop))))
181 (signal 'elmo-open-error '(elmo-pop3-auth-apop))))
183 (luna-define-method elmo-network-initialize-session-buffer :after
184 ((session elmo-pop3-session) buffer)
185 (with-current-buffer buffer
186 (mapcar 'make-variable-buffer-local elmo-pop3-local-variables)))
188 (luna-define-method elmo-network-initialize-session ((session
190 (let ((process (elmo-network-session-process-internal session))
192 (with-current-buffer (process-buffer process)
193 (set-process-filter process 'elmo-pop3-process-filter)
194 (setq elmo-pop3-read-point (point-min))
195 ;; Skip garbage output from process before greeting.
196 (while (and (memq (process-status process) '(open run))
197 (goto-char (point-max))
199 (not (looking-at "+OK")))
200 (accept-process-output process 1))
201 (setq elmo-pop3-read-point (point))
202 (or (elmo-network-session-set-greeting-internal
204 (elmo-pop3-read-response process t))
205 (signal 'elmo-open-error
206 '(elmo-network-intialize-session)))
207 (when (eq (elmo-network-stream-type-symbol
208 (elmo-network-session-stream-type-internal session))
210 (elmo-pop3-send-command process "stls")
211 (if (string-match "^\+OK"
212 (elmo-pop3-read-response process))
213 (starttls-negotiate process)
214 (signal 'elmo-open-error
215 '(elmo-pop3-starttls-error)))))))
217 (luna-define-method elmo-network-authenticate-session ((session
219 (with-current-buffer (process-buffer
220 (elmo-network-session-process-internal session))
221 (let* ((process (elmo-network-session-process-internal session))
222 (auth (elmo-network-session-auth-internal session))
223 (auth (mapcar '(lambda (mechanism) (upcase (symbol-name mechanism)))
224 (if (listp auth) auth (list auth))))
226 client name step response mechanism
227 sasl-read-passphrase)
228 (or (and (string= "USER" (car auth))
229 (elmo-pop3-auth-user session))
230 (and (string= "APOP" (car auth))
231 (elmo-pop3-auth-apop session))
234 (setq sasl-mechanisms (mapcar 'car sasl-mechanism-alist))
235 (setq mechanism (sasl-find-mechanism auth))
237 (signal 'elmo-authenticate-error '(elmo-pop3-auth-no-mechanisms)))
241 (elmo-network-session-user-internal session)
243 (elmo-network-session-host-internal session)))
244 ;;; (if elmo-pop3-auth-user-realm
245 ;;; (sasl-client-set-property client 'realm elmo-pop3-auth-user-realm))
246 (setq name (sasl-mechanism-name mechanism))
247 (elmo-network-session-set-auth-internal session
248 (intern (downcase name)))
249 (setq sasl-read-passphrase
253 (elmo-network-session-password-key session)))))
254 (setq step (sasl-next-step client nil))
255 (elmo-pop3-send-command
258 (and (sasl-step-data step)
261 (elmo-base64-encode-string
262 (sasl-step-data step) 'no-line-break))))) ;)
265 (unless (setq response (elmo-pop3-read-response process t))
266 ;; response is NO or BAD.
267 (signal 'elmo-authenticate-error
269 (concat "elmo-pop3-auth-"
271 (if (string-match "^\+OK" response)
272 (if (sasl-next-step client step)
274 (signal 'elmo-authenticate-error
276 (concat "elmo-pop3-auth-"
278 ;; The authentication process is finished.
282 (elmo-base64-decode-string
283 (cadr (split-string response " "))))
284 (setq step (sasl-next-step client step))
285 (elmo-pop3-send-command
287 (if (sasl-step-data step)
288 (elmo-base64-encode-string (sasl-step-data step)
292 (luna-define-method elmo-network-setup-session ((session
294 (let ((process (elmo-network-session-process-internal session))
296 (with-current-buffer (process-buffer process)
297 (setq elmo-pop3-size-hash (elmo-make-hash 31))
298 ;; To get obarray of uidl and size
299 (elmo-pop3-send-command process "list")
300 (if (null (elmo-pop3-read-response process))
301 (error "POP LIST command failed"))
302 (if (null (setq response
303 (elmo-pop3-read-contents
304 (current-buffer) process)))
305 (error "POP LIST command failed"))
306 ;; POP server always returns a sequence of serial numbers.
307 (setq count (elmo-pop3-parse-list-response response))
309 (when elmo-pop3-use-uidl
310 (setq elmo-pop3-uidl-number-hash (elmo-make-hash (* count 2)))
311 (setq elmo-pop3-number-uidl-hash (elmo-make-hash (* count 2)))
313 (elmo-pop3-send-command process "uidl")
314 (unless (elmo-pop3-read-response process)
315 (error "POP UIDL failed"))
316 (unless (setq response (elmo-pop3-read-contents
317 (current-buffer) process))
318 (error "POP UIDL failed"))
319 (elmo-pop3-parse-uidl-response response)))))
321 (defun elmo-pop3-read-contents (buffer process)
324 (let ((case-fold-search nil)
326 (goto-char elmo-pop3-read-point)
327 (while (not (re-search-forward "^\\.\r\n" nil t))
328 (accept-process-output process)
329 (goto-char elmo-pop3-read-point))
330 (setq match-end (point))
332 (buffer-substring elmo-pop3-read-point
336 (defun elmo-pop3-list-folders (spec &optional hierarchy) nil)
337 (defun elmo-pop3-append-msg (spec string) nil nil)
338 (defun elmo-pop3-folder-creatable-p (spec) nil)
339 (defun elmo-pop3-create-folder (spec) nil)
341 (defun elmo-pop3-folder-exists-p (spec)
342 (if (and elmo-pop3-exists-exactly
343 (elmo-pop3-plugged-p spec))
345 (let (elmo-auto-change-plugged ; don't change plug status.
346 elmo-pop3-use-uidl ; No need to use uidl.
349 (setq session (elmo-pop3-get-session spec))
351 (elmo-network-close-session session)))))
354 (defun elmo-pop3-parse-uidl-response (string)
355 (let ((buffer (current-buffer))
358 (let (number uid list)
360 (goto-char (point-min))
361 (while (re-search-forward "^\\([0-9]+\\)[\t ]\\([^ \n]+\\)$" nil t)
362 (setq number (elmo-match-buffer 1))
363 (setq uid (elmo-match-buffer 2))
364 (with-current-buffer buffer
365 (elmo-set-hash-val uid number elmo-pop3-uidl-number-hash)
366 (elmo-set-hash-val (concat "#" number) uid
367 elmo-pop3-number-uidl-hash))
368 (setq list (cons uid list)))
369 (with-current-buffer buffer (setq elmo-pop3-uidl-done t))
372 (defun elmo-pop3-parse-list-response (string)
373 (let ((buffer (current-buffer))
378 (goto-char (point-min))
379 (while (re-search-forward "^\\([0-9]+\\)[\t ]\\([0-9]+\\)$" nil t)
382 (cons (elmo-match-buffer 1)
383 (elmo-match-buffer 2))
385 (setq count (1+ count)))
386 (with-current-buffer buffer
387 (setq elmo-pop3-size-hash (elmo-make-hash (* (length alist) 2)))
389 (elmo-set-hash-val (concat "#" (car (car alist)))
392 (setq alist (cdr alist)))
393 (setq elmo-pop3-list-done t))
396 (defun elmo-pop3-list-location (spec)
397 (with-current-buffer (process-buffer
398 (elmo-network-session-process-internal
399 (elmo-pop3-get-session spec)))
401 (if elmo-pop3-uidl-done
405 (setq list (cons (symbol-name atom) list)))
406 elmo-pop3-uidl-number-hash)
408 (error "POP3: Error in UIDL")))))
410 (defun elmo-pop3-list-by-uidl-subr (spec &optional nonsort)
411 (let ((flist (elmo-list-folder-by-location
413 (elmo-pop3-list-location spec))))
415 (cons (elmo-max-of-list flist) (length flist))
418 (defun elmo-pop3-list-by-list (spec)
419 (with-current-buffer (process-buffer
420 (elmo-network-session-process-internal
421 (elmo-pop3-get-session spec)))
423 (if elmo-pop3-list-done
425 (mapatoms (lambda (atom)
426 (setq list (cons (string-to-int
427 (substring (symbol-name atom) 1))
431 (error "POP3: Error in list")))))
433 (defun elmo-pop3-list-folder (spec &optional nohide)
434 (let ((killed (and elmo-use-killed-list
435 (elmo-msgdb-killed-list-load
436 (elmo-msgdb-expand-path spec))))
438 (elmo-pop3-commit spec)
439 (setq numbers (if elmo-pop3-use-uidl
441 (elmo-pop3-list-by-uidl-subr spec))
442 (elmo-pop3-list-by-list spec)))
443 (elmo-living-messages numbers killed)))
445 (defun elmo-pop3-max-of-folder (spec)
446 (elmo-pop3-commit spec)
447 (if elmo-pop3-use-uidl
448 (elmo-pop3-list-by-uidl-subr spec 'nonsort)
450 (elmo-network-session-process-internal
451 (elmo-pop3-get-session spec)))
454 (with-current-buffer (process-buffer process)
455 (elmo-pop3-send-command process "STAT")
456 (setq response (elmo-pop3-read-response process))
457 ;; response: "^\+OK 2 7570$"
458 (if (not (string-match "^\+OK[ \t]*\\([0-9]*\\)" response))
459 (error "POP STAT command failed")
462 (substring response (match-beginning 1)(match-end 1 ))))
463 (cons total total))))))
465 (defvar elmo-pop3-header-fetch-chop-length 200)
467 (defsubst elmo-pop3-next-result-arrived-p ()
469 ((eq (following-char) ?+)
470 (if (re-search-forward "\n\\.\r?\n" nil t)
474 (if (search-forward "\n" nil t)
480 (defun elmo-pop3-retrieve-headers (buffer tobuffer process articles)
484 (let ((number (length articles))
487 (last-point (point-min)))
488 ;; Send HEAD commands.
490 (elmo-pop3-send-command process (format
491 "top %s 0" (car articles))
493 ;;; (accept-process-output process 1)
494 (setq articles (cdr articles))
495 (setq count (1+ count))
496 ;; Every 200 requests we have to read the stream in
497 ;; order to avoid deadlocks.
498 (when (or elmo-pop3-send-command-synchronously
499 (null articles) ;All requests have been sent.
500 (zerop (% count elmo-pop3-header-fetch-chop-length)))
501 (unless elmo-pop3-send-command-synchronously
502 (accept-process-output process 1))
506 (goto-char last-point)
508 (while (elmo-pop3-next-result-arrived-p)
509 (setq last-point (point))
510 (setq received (1+ received)))
512 (when (> number elmo-display-progress-threshold)
513 (if (or (zerop (% received 5)) (= received number))
514 (elmo-display-progress
515 'elmo-pop3-retrieve-headers "Getting headers..."
516 (/ (* received 100) number))))
517 (accept-process-output process 1)
518 ;;; (accept-process-output process)
520 ;; Remove all "\r"'s.
521 (goto-char (point-min))
522 (while (search-forward "\r\n" nil t)
523 (replace-match "\n"))
524 (copy-to-buffer tobuffer (point-min) (point-max)))))
526 (defalias 'elmo-pop3-msgdb-create 'elmo-pop3-msgdb-create-as-numlist)
528 (defun elmo-pop3-sort-overview-by-original-number (overview loc-alist)
532 (< (elmo-pop3-uidl-to-number
533 (cdr (assq (elmo-msgdb-overview-entity-get-number ent1)
535 (elmo-pop3-uidl-to-number
536 (cdr (assq (elmo-msgdb-overview-entity-get-number ent2)
540 (defun elmo-pop3-sort-msgdb-by-original-number (msgdb)
541 (message "Sorting...")
542 (let ((overview (elmo-msgdb-get-overview msgdb)))
543 (setq overview (elmo-pop3-sort-overview-by-original-number
545 (elmo-msgdb-get-location msgdb)))
546 (message "Sorting...done")
547 (list overview (nth 1 msgdb)(nth 2 msgdb)(nth 3 msgdb)(nth 4 msgdb))))
549 (defun elmo-pop3-msgdb-create-as-numlist (spec numlist new-mark
550 already-mark seen-mark
551 important-mark seen-list
554 (let ((process (elmo-network-session-process-internal
555 (elmo-pop3-get-session spec)))
557 (if elmo-pop3-use-uidl
558 (setq loc-alist (if msgdb (elmo-msgdb-get-location msgdb)
559 (elmo-msgdb-location-load
560 (elmo-msgdb-expand-path spec)))))
561 (with-current-buffer (process-buffer process)
562 (elmo-pop3-sort-msgdb-by-original-number
563 (elmo-pop3-msgdb-create-by-header process numlist
564 new-mark already-mark
568 (defun elmo-pop3-uidl-to-number (uidl)
569 (string-to-number (elmo-get-hash-val uidl
570 elmo-pop3-uidl-number-hash)))
572 (defun elmo-pop3-number-to-uidl (number)
573 (elmo-get-hash-val (format "#%d" number)
574 elmo-pop3-number-uidl-hash))
576 (defun elmo-pop3-number-to-size (number)
577 (elmo-get-hash-val (format "#%d" number)
578 elmo-pop3-size-hash))
580 (defun elmo-pop3-msgdb-create-by-header (process numlist
581 new-mark already-mark
585 (let ((tmp-buffer (get-buffer-create " *ELMO Overview TMP*")))
586 (with-current-buffer (process-buffer process)
587 (if loc-alist ; use uidl.
593 (elmo-pop3-uidl-to-number (cdr (assq number loc-alist))))
595 (elmo-pop3-retrieve-headers (process-buffer process)
596 tmp-buffer process numlist)
598 (elmo-pop3-msgdb-create-message
603 new-mark already-mark seen-mark seen-list loc-alist)
604 (kill-buffer tmp-buffer)))))
606 (defun elmo-pop3-msgdb-create-message (buffer
609 numlist new-mark already-mark
614 (let (beg overview number-alist mark-alist
615 entity i number message-id gmark seen size)
617 (elmo-set-buffer-multibyte default-enable-multibyte-characters)
618 (goto-char (point-min))
620 (message "Creating msgdb...")
622 (setq beg (save-excursion (forward-line 1) (point)))
623 (elmo-pop3-next-result-arrived-p)
627 (narrow-to-region beg (point))
629 (elmo-msgdb-create-overview-from-buffer
631 (setq numlist (cdr numlist))
634 (elmo-msgdb-append-element
636 (with-current-buffer (process-buffer process)
637 (elmo-msgdb-overview-entity-set-size
640 (elmo-pop3-number-to-size
641 (elmo-msgdb-overview-entity-get-number entity))))
645 (elmo-pop3-number-to-uidl
646 (elmo-msgdb-overview-entity-get-number entity))
648 (elmo-msgdb-overview-entity-set-number entity number)))
650 (elmo-msgdb-number-add
652 (elmo-msgdb-overview-entity-get-number entity)
654 (setq message-id (car entity))
655 (setq seen (member message-id seen-list))
656 (if (setq gmark (or (elmo-msgdb-global-mark-get message-id)
657 (if (elmo-cache-exists-p
663 (if elmo-pop3-use-cache
667 (elmo-msgdb-mark-append
669 (elmo-msgdb-overview-entity-get-number entity)
671 (when (> num elmo-display-progress-threshold)
673 (if (or (zerop (% i 5)) (= i num))
674 (elmo-display-progress
675 'elmo-pop3-msgdb-create-message "Creating msgdb..."
676 (/ (* i 100) num)))))
677 (list overview number-alist mark-alist loc-alist))))
679 (defun elmo-pop3-read-body (process outbuf)
680 (with-current-buffer (process-buffer process)
681 (let ((start elmo-pop3-read-point)
684 (while (not (re-search-forward "^\\.\r?\n" nil t))
685 (accept-process-output process)
688 (with-current-buffer outbuf
690 (insert-buffer-substring (process-buffer process) start (- end 3))
691 (elmo-delete-cr-get-content-type)))))
693 (defun elmo-pop3-read-msg (spec number outbuf &optional msgdb unread)
694 (let* ((loc-alist (if elmo-pop3-use-uidl
696 (elmo-msgdb-get-location msgdb)
697 (elmo-msgdb-location-load
698 (elmo-msgdb-expand-path spec)))))
699 (process (elmo-network-session-process-internal
700 (elmo-pop3-get-session spec)))
702 (with-current-buffer (process-buffer process)
704 (setq number (elmo-pop3-uidl-to-number
705 (cdr (assq number loc-alist)))))
707 (elmo-pop3-send-command process
708 (format "retr %s" number))
709 (when (null (setq response (elmo-pop3-read-response
711 (error "Fetching message failed"))
712 (setq response (elmo-pop3-read-body process outbuf))
714 (goto-char (point-min))
715 (while (re-search-forward "^\\." nil t)
720 (defun elmo-pop3-delete-msg (process number loc-alist)
721 (with-current-buffer (process-buffer process)
722 (let (response errmsg msg)
724 (setq number (elmo-pop3-uidl-to-number
725 (cdr (assq number loc-alist)))))
728 (elmo-pop3-send-command process
729 (format "dele %s" number))
730 (when (null (setq response (elmo-pop3-read-response
732 (error "Deleting message failed")))
733 (error "Deleting message failed")))))
735 (defun elmo-pop3-delete-msgs (spec msgs &optional msgdb)
736 (let ((loc-alist (if elmo-pop3-use-uidl
738 (elmo-msgdb-get-location msgdb)
739 (elmo-msgdb-location-load
740 (elmo-msgdb-expand-path spec)))))
741 (process (elmo-network-session-process-internal
742 (elmo-pop3-get-session spec))))
743 (mapcar '(lambda (msg) (elmo-pop3-delete-msg
744 process msg loc-alist))
747 (defun elmo-pop3-search (spec condition &optional numlist)
748 (error "Searching in pop3 folder is not implemented yet"))
750 (defun elmo-pop3-use-cache-p (spec number)
753 (defun elmo-pop3-local-file-p (spec number)
756 (defun elmo-pop3-port-label (spec)
758 (if (elmo-pop3-spec-stream-type spec)
759 (concat "!" (symbol-name
760 (elmo-network-stream-type-symbol
761 (elmo-pop3-spec-stream-type spec)))))))
763 (defsubst elmo-pop3-portinfo (spec)
764 (list (elmo-pop3-spec-hostname spec)
765 (elmo-pop3-spec-port spec)))
767 (defun elmo-pop3-plugged-p (spec)
768 (apply 'elmo-plugged-p
769 (append (elmo-pop3-portinfo spec)
770 (list nil (quote (elmo-pop3-port-label spec))))))
772 (defun elmo-pop3-set-plugged (spec plugged add)
773 (apply 'elmo-set-plugged plugged
774 (append (elmo-pop3-portinfo spec)
775 (list nil nil (quote (elmo-pop3-port-label spec)) add))))
777 (defalias 'elmo-pop3-sync-number-alist
778 'elmo-generic-sync-number-alist)
779 (defalias 'elmo-pop3-list-folder-unread
780 'elmo-generic-list-folder-unread)
781 (defalias 'elmo-pop3-list-folder-important
782 'elmo-generic-list-folder-important)
783 (defalias 'elmo-pop3-folder-diff 'elmo-generic-folder-diff)
785 (defun elmo-pop3-commit (spec)
786 (if (elmo-pop3-plugged-p spec)
787 (let ((session (elmo-pop3-get-session spec 'if-exists)))
789 (elmo-network-close-session session)))))
793 (product-provide (provide 'elmo-pop3) (require 'elmo-version))
795 ;;; elmo-pop3.el ends here