aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mbsync
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-05-15 20:03:30 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-05-15 20:16:37 -0500
commit5bf571df14cd2ed7cf6ca6ecadc26da53d61af06 (patch)
tree47942cf31b8fb04a35eb7cb6406117f94a5f2b77 /mbsync
parent69e420c803099db126fffd3ca4bac5e396da4e1d (diff)
feat(mail): move all mail stuff inside notmuch hooks
Diffstat (limited to 'mbsync')
-rw-r--r--mbsync/.config/environment.d/20-mail.conf1
-rw-r--r--mbsync/.config/mbsync/mbsyncrc59
-rw-r--r--mbsync/.config/systemd/user/maildir-notify@.service10
-rw-r--r--mbsync/.config/systemd/user/mbsync@.service12
-rw-r--r--mbsync/.config/zsh/.zshrc.d/20-mbsync.sh3
-rwxr-xr-xmbsync/.local/bin/maildir-notify15
-rwxr-xr-xmbsync/install.sh15
7 files changed, 0 insertions, 115 deletions
diff --git a/mbsync/.config/environment.d/20-mail.conf b/mbsync/.config/environment.d/20-mail.conf
deleted file mode 100644
index 1c12b82..0000000
--- a/mbsync/.config/environment.d/20-mail.conf
+++ /dev/null
@@ -1 +0,0 @@
-MAIL=$XDG_DATA_HOME/mail/porkbun/INBOX
diff --git a/mbsync/.config/mbsync/mbsyncrc b/mbsync/.config/mbsync/mbsyncrc
deleted file mode 100644
index a2501eb..0000000
--- a/mbsync/.config/mbsync/mbsyncrc
+++ /dev/null
@@ -1,59 +0,0 @@
-Create Both
-Expunge Both
-SyncState *
-
-IMAPAccount porkbun
-Host imap.porkbun.com
-User tobyv@tobyvin.dev
-PassCmd "pass tobyv@tobyvin.dev"
-SSLType IMAPS
-CertificateFile /etc/ssl/certs/ca-certificates.crt
-
-IMAPStore porkbun-remote
-Account porkbun
-
-MaildirStore porkbun-local
-Path ~/.local/share/mail/porkbun/
-Inbox ~/.local/share/mail/porkbun/INBOX
-
-Channel porkbun
-Far :porkbun-remote:
-Near :porkbun-local:
-Patterns *
-
-IMAPAccount gmail
-Host imap.gmail.com
-User tobyv13@gmail.com
-PassCmd "pass gmail"
-SSLType IMAPS
-CertificateFile /etc/ssl/certs/ca-certificates.crt
-
-IMAPStore gmail-remote
-Account gmail
-
-MaildirStore gmail-local
-Path ~/.local/share/mail/gmail/
-Inbox ~/.local/share/mail/gmail/INBOX
-
-Channel gmail
-Far :gmail-remote:
-Near :gmail-local:
-Patterns "INBOX"
-
-Channel gmail-drafts
-Far :gmail-remote:"[Gmail]/Drafts"
-Near :gmail-local:Drafts
-
-Channel gmail-sent
-Far :gmail-remote:"[Gmail]/Sent Mail"
-Near :gmail-local:Sent
-
-Channel gmail-trash
-Far :gmail-remote:"[Gmail]/Trash"
-Near :gmail-local:Trash
-
-Group gmail
-Channel gmail
-Channel gmail-drafts
-Channel gmail-sent
-Channel gmail-trash
diff --git a/mbsync/.config/systemd/user/maildir-notify@.service b/mbsync/.config/systemd/user/maildir-notify@.service
deleted file mode 100644
index 6d2d3e0..0000000
--- a/mbsync/.config/systemd/user/maildir-notify@.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Notify on new mail in MailDir %i
-
-[Service]
-Type=simple
-ExecStart=%h/.local/bin/maildir-notify ${XDG_DATA_HOME}/mail/%i/INBOX
-RestartSec=10
-
-[Install]
-WantedBy=default.target
diff --git a/mbsync/.config/systemd/user/mbsync@.service b/mbsync/.config/systemd/user/mbsync@.service
deleted file mode 100644
index f0476b3..0000000
--- a/mbsync/.config/systemd/user/mbsync@.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Mailbox synchronization service
-Documentation=man:mbsync(1)
-Wants=network-online.target
-After=network-online.target network.target
-
-[Service]
-Type=oneshot
-ExecStart=-/usr/bin/mbsync -Vc ${XDG_CONFIG_HOME}/mbsync/mbsyncrc %i
-
-[Install]
-WantedBy=default.target
diff --git a/mbsync/.config/zsh/.zshrc.d/20-mbsync.sh b/mbsync/.config/zsh/.zshrc.d/20-mbsync.sh
deleted file mode 100644
index ee5109e..0000000
--- a/mbsync/.config/zsh/.zshrc.d/20-mbsync.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/zsh
-
-alias mbsync="mbsync -c $XDG_CONFIG_HOME/mbsync/mbsyncrc"
diff --git a/mbsync/.local/bin/maildir-notify b/mbsync/.local/bin/maildir-notify
deleted file mode 100755
index 4250bfe..0000000
--- a/mbsync/.local/bin/maildir-notify
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-for maildir; do
- printf 'monitoring: %s\n' "$maildir"
- set -- "$@" "${maildir}/new"
- shift
-done
-
-inotifywait --monitor --event create --event moved_to "$@" |
- while read -r dir _action file; do
- grep '^\(Subject\|From\|To\): .*$' <"${dir}${file}" |
- sed -e 's/</\&lt\;/g' -e 's/>/\&gt\;/g' |
- notify-send -a maildir-notify -c email.arrived -i mail-unread \
- 'You have new mail' "$(cat -)"
- done
diff --git a/mbsync/install.sh b/mbsync/install.sh
deleted file mode 100755
index 79e0fd5..0000000
--- a/mbsync/install.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-pkgname=mbsync
-
-if ! command -v "$pkgname" >/dev/null; then
- printf '%s: %s not found, skipping...\n' "$0" "$pkgname"
- exit 0
-fi
-
-printf "%s: Installing services\n" "$0"
-
-for instance in gmail porkbun; do
- systemctl --user enable --now --no-block mbsync@"$instance".service
- systemctl --user enable --now --no-block maildir-notify@"$instance".service
-done