diff --git a/.config/aerc/accounts.conf b/.config/aerc/accounts.conf index 120c20a4..26776ca3 100644 --- a/.config/aerc/accounts.conf +++ b/.config/aerc/accounts.conf @@ -18,3 +18,14 @@ from = Daniel Fichtinger default = INBOX copy-to = Sent signature-file = /home/fic/mail/fichtinger.d@queensu.ca.sig + +[Proton-Local] +source = notmuch://~/.mail/ +query-map = ~/.config/aerc/map.conf +outgoing = smtp+plain://daniel%40ficd.ca@127.0.0.1:1025 +outgoing-cred-cmd = pass show proton/bridge +default = INBOX +from = Daniel Fichtinger +copy-to = Sent +cache-headers = true +signature-file = /home/fic/mail/daniel@ficd.ca.sig diff --git a/.config/aerc/mail-sync.sh b/.config/aerc/mail-sync.sh new file mode 100755 index 00000000..c8b1ab45 --- /dev/null +++ b/.config/aerc/mail-sync.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +MBSYNC=$(pgrep mbsync) +NOTMUCH=$(pgrep notmuch) + +if [ -n "$MBSYNC" -o -n "$NOTMUCH" ]; then + echo "Already running one instance of mbsync or notmuch. Exiting..." + exit 0 +fi + +echo "Deleting messages tagged as *deleted*" +notmuch search --format=text0 --output=files tag:deleted | xargs -0 --no-run-if-empty rm -v + +mbsync -Va +notmuch new diff --git a/.config/aerc/map.conf b/.config/aerc/map.conf new file mode 100644 index 00000000..4ccaa5c0 --- /dev/null +++ b/.config/aerc/map.conf @@ -0,0 +1 @@ +Inbox=tag:inbox and not tag:archived and not tag:deleted diff --git a/.config/yadm/tracked b/.config/yadm/tracked index dc571bc3..ea4e7dfc 100644 --- a/.config/yadm/tracked +++ b/.config/yadm/tracked @@ -46,3 +46,5 @@ .config/clipcat .config/aerc .config/aerc +.mbsyncrc +.notmuch-config diff --git a/.mbsyncrc b/.mbsyncrc new file mode 100644 index 00000000..f55e45a2 --- /dev/null +++ b/.mbsyncrc @@ -0,0 +1,32 @@ +IMAPAccount protonmail +Host 127.0.0.1 +Port 1143 +User daniel@ficd.ca +PassCmd "pass show proton/bridge" +SSLType NONE + +IMAPStore pm-remote +Account protonmail + +MaildirStore pm-local +Path ~/.mail/ +Inbox ~/.mail/INBOX/ + +Channel pm-inbox +Far :pm-remote: +Near :pm-local: +Patterns "INBOX" +Create Both +Expunge Both +SyncState * + +Channel pm-sent +Far :pm-remote:"Sent" +Near :pm-local:"sent" +Create Both +Expunge Both +SyncState * + +Group protonmail +Channel pm-inbox +Channel pm-sent diff --git a/.notmuch-config b/.notmuch-config new file mode 100644 index 00000000..10246c77 --- /dev/null +++ b/.notmuch-config @@ -0,0 +1,19 @@ +[database] + +path=/home/fic/.mail + +[user] +name=Daniel Fichtinger +primary_email=daniel@ficd.ca + +[new] +tags=unread;inbox;sent; +ignore= + +[search] +exclude_tags=deleted;spam; +[maildir] +synchronize_flags=true + +[crypto] +gpg_path=gpg