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 |
276 |
(:path (or (getenv "MAIL") |
(:path (or (getenv "MAIL") |
277 |
(expand-file-name (user-login-name) rmail-spool-directory)))) |
(expand-file-name (user-login-name) rmail-spool-directory)))) |
278 |
(directory |
(directory |
279 |
|
(:prescript) |
280 |
|
(:prescript-delay) |
281 |
|
(:postscript) |
282 |
(:path) |
(:path) |
283 |
(:suffix ".spool") |
(:suffix ".spool") |
284 |
(:predicate identity)) |
(:predicate identity)) |
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) |