Created: July 25, 2018

Last modified: May 28, 2023

email: mbsync + mu4e configuration

mbsync

Not exporting my config for now since it contains all my email addresses

I was playing around at one point of using the emacs-devel public inbox

Create Near
Sync Pull
SyncState *

IMAPAccount public-inbox
Host news.yhetil.org
User guest
SSLType IMAPS

IMAPStore public-inbox-remote
Account public-inbox
PathDelimiter /
# Path "yhetil.emacs.devel"

MaildirStore public-inbox-local
Path ~/mbsync/emacs-devel/

Channel emacs-devel
Far :public-inbox-remote:"yhetil.emacs.devel.5"
Near :public-inbox-local:all

Channel emacs-devel-2
Far :public-inbox-remote:"yhetil.emacs.devel.4"
Near :public-inbox-local:all-2

# Channel all
# Far :public-inbox-remote:
# Near :public-inbox-local:
# Patterns *

mu4e

Also not exporting this config for now since it contains all my email addresses

some mu searches

mu find "maildir:/emacs-devel/all" --fields "i"
mu find "maildir:/gmail/all and list:emacs-devel.gnu.org" --fields "i"
comm -3 <(sort gmail_emacs-devel.txt) <(sort gmail-emacs-devel.txt) | less

rank senders script

for s in `mu cfind -o wl | cut -d ' ' -f 1`; do
    out=$(mu find "maildir:/gmail/inbox and from:$s" 2>/dev/null | wc -l )
    if [ $out -ne 0 ]; then
        echo $out $s
    fi
done
sh rank_senders.sh | sort -h > senders.txt

mu add missing emails

(defun read-lines (filePath)
  "Return a list of lines of a file at filePath."
  (with-temp-buffer
    (insert-file-contents filePath)
    (split-string (buffer-string) "\n" t)))

(let* ((msgids (read-lines "~/mbsync/icloud_emacs-devel-missing.txt"))
       (searchstrs (mapcar (lambda (id) (concat " or i:" id)) msgids))
       (searchstr (substring (apply 'concat searchstrs) 4 nil)))
  (mu4e-headers-search searchstr))

Backlinks: