summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--custom/jao-custom-gnus.el23
1 files changed, 16 insertions, 7 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el
index c6bb301..e359029 100644
--- a/custom/jao-custom-gnus.el
+++ b/custom/jao-custom-gnus.el
@@ -185,16 +185,25 @@
nnmail-split-methods 'nnmail-split-fancy)
;;;; nnml
-(setq mail-sources
- (when jao-gnus-use-nnml ;; (and jao-gnus-use-nnml (not jao-notmuch-enabled))
- (let ((fix (regexp-opt '("feeds" "local" "trash" "spam"))))
- (mapcar (lambda (d) `(maildir :path ,(concat d "/")))
- (directory-files "~/var/mail/gnus/" t
- (concat "[^\\.]+\\.[^\\.]+\\|" fix)))))
- gnus-message-archive-group nil
+(setq gnus-message-archive-group nil
nnml-get-new-mail t
nnml-directory message-directory)
+(setq mail-sources
+ (let* ((pwd (auth-source-pick-first-password :host "proton-bridge"))
+ (mds (mapcar (lambda (f)
+ `(maildir :path ,(expand-file-name f "~/var/mail/")))
+ '("local/" "feeds/")))
+ (ims (mapcar (lambda (b)
+ `(imap :server "127.0.0.1" :port 1143
+ :user "mail@jao.io" :password ,pwd
+ :stream starttls :predicate "1:*"
+ :fetchflag "\\Deleted \\Seen"
+ :mailbox ,(concat "Labels/#" b)))
+ '("inbox" "drivel" "hacking" "bills"
+ "bigml" "prog" "words"))))
+ (append mds ims)))
+
(when jao-gnus-use-nnml
(add-to-list
'gnus-secondary-select-methods