summaryrefslogtreecommitdiffhomepage
path: root/custom
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-04-24 23:15:37 +0100
committerjao <jao@gnu.org>2024-04-24 23:15:37 +0100
commit79b3e87a66c6eacc4ed4ec6b933e32b789eec280 (patch)
tree114e6acaef700a757fa099b720f4e0625eb66785 /custom
parentaebe12c6460e2197b801fd5b0535bc74c2d38927 (diff)
downloadelibs-79b3e87a66c6eacc4ed4ec6b933e32b789eec280.tar.gz
elibs-79b3e87a66c6eacc4ed4ec6b933e32b789eec280.tar.bz2
gnus: imap mail sources
Diffstat (limited to 'custom')
-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