1 |
;;; mail-source.el --- functions for fetching mail |
;;; mail-source.el --- functions for fetching mail |
2 |
;; Copyright (C) 1999, 2000 Free Software Foundation, Inc. |
;; Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
5 |
;; Keywords: news, mail |
;; Keywords: news, mail |
291 |
(:password) |
(:password) |
292 |
(:authentication password)) |
(:authentication password)) |
293 |
(maildir |
(maildir |
294 |
|
(:prescript) |
295 |
|
(:prescript-delay) |
296 |
|
(:postscript) |
297 |
(:path (or (getenv "MAILDIR") "~/Maildir/")) |
(:path (or (getenv "MAILDIR") "~/Maildir/")) |
298 |
(:subdirs ("new" "cur")) |
(:subdirs ("new" "cur")) |
299 |
(:function)) |
(:function)) |
612 |
(defun mail-source-fetch-directory (source callback) |
(defun mail-source-fetch-directory (source callback) |
613 |
"Fetcher for directory sources." |
"Fetcher for directory sources." |
614 |
(mail-source-bind (directory source) |
(mail-source-bind (directory source) |
615 |
|
(mail-source-run-script |
616 |
|
prescript (format-spec-make ?t path) |
617 |
|
prescript-delay) |
618 |
(let ((found 0) |
(let ((found 0) |
619 |
(mail-source-string (format "directory:%s" path))) |
(mail-source-string (format "directory:%s" path))) |
620 |
(dolist (file (directory-files |
(dolist (file (directory-files |
623 |
(funcall predicate file) |
(funcall predicate file) |
624 |
(mail-source-movemail file mail-source-crash-box)) |
(mail-source-movemail file mail-source-crash-box)) |
625 |
(incf found (mail-source-callback callback file)))) |
(incf found (mail-source-callback callback file)))) |
626 |
|
(mail-source-run-script |
627 |
|
postscript (format-spec-make ?t path)) |
628 |
found))) |
found))) |
629 |
|
|
630 |
(defun mail-source-fetch-pop (source callback) |
(defun mail-source-fetch-pop (source callback) |