From 06d1242317f7159ccf3014f0a1480e7c56236ebb Mon Sep 17 00:00:00 2001 From: Mohammad Reza Karimi Date: Sun, 4 Jan 2026 21:28:36 -0500 Subject: add all sorts of things --- email/dot-config/imapnotify/mit.yaml | 16 ++++++++ email/dot-config/isyncrc | 50 +++++++++++++++++++++++++ email/dot-config/msmtp/config | 14 +++++++ email/dot-config/notmuch/default/config | 39 +++++++++++++++++++ email/dot-config/notmuch/default/hooks/post-new | 10 +++++ email/dot-config/oama/config.yaml | 15 ++++++++ email/dot-config/systemd/user/goimap.service | 15 ++++++++ 7 files changed, 159 insertions(+) create mode 100644 email/dot-config/imapnotify/mit.yaml create mode 100644 email/dot-config/isyncrc create mode 100644 email/dot-config/msmtp/config create mode 100644 email/dot-config/notmuch/default/config create mode 100755 email/dot-config/notmuch/default/hooks/post-new create mode 100644 email/dot-config/oama/config.yaml create mode 100644 email/dot-config/systemd/user/goimap.service (limited to 'email/dot-config') diff --git a/email/dot-config/imapnotify/mit.yaml b/email/dot-config/imapnotify/mit.yaml new file mode 100644 index 0000000..d29f3cf --- /dev/null +++ b/email/dot-config/imapnotify/mit.yaml @@ -0,0 +1,16 @@ +configurations: + - + host: outlook.office365.com + port: 993 + tls: true + tlsOptions: + rejectUnauthorized: false + starttls: false + xoAuth2: true + username: moreka@mit.edu + passwordCmd: 'oama access moreka@mit.edu' + onNewMail: '' + onNewMailPost: SKIP + boxes: + - + mailbox: INBOX diff --git a/email/dot-config/isyncrc b/email/dot-config/isyncrc new file mode 100644 index 0000000..e57ece5 --- /dev/null +++ b/email/dot-config/isyncrc @@ -0,0 +1,50 @@ +IMAPAccount mit +Host outlook.office365.com +User moreka@mit.edu +PassCmd "oama access moreka@mit.edu" +Port 993 +AuthMechs XOAUTH2 +TLSType IMAPS + +IMAPStore mit-remote +Account mit + +MaildirStore mit-local +SubFolders Verbatim +Path /home/moreka/.local/share/mail/mit/ +Inbox /home/moreka/.local/share/mail/mit/INBOX + +Channel sync-mit-sent +Far :mit-remote:"Sent\ Items" +Near :mit-local:Sent +Create Near +SyncState * + +Channel sync-mit-deleted +Far :mit-remote:"Deleted\ Items" +Near :mit-local:Deleted +Create Near +Expunge Both +SyncState * + +Channel sync-mit-junk +Far :mit-remote:"Junk\ Email" +Near :mit-local:Spam +Create Near +Expunge Both +SyncState * + +Channel sync-mit-default +Far :mit-remote: +Near :mit-local: +Patterns "INBOX" "Archive" "Drafts" +Create Near +Expunge Both +SyncState * +ExpireUnread no + +Group mit +Channel sync-mit-default +Channel sync-mit-sent +Channel sync-mit-deleted +Channel sync-mit-junk diff --git a/email/dot-config/msmtp/config b/email/dot-config/msmtp/config new file mode 100644 index 0000000..e000852 --- /dev/null +++ b/email/dot-config/msmtp/config @@ -0,0 +1,14 @@ +defaults +auth on +tls on +tls_starttls off + +account mit +host outgoing.mit.edu +port 465 +from moreka@mit.edu +user moreka +passwordeval "pass show mail/smtp" +logfile ~/.cache/msmtp.log + +account default : mit diff --git a/email/dot-config/notmuch/default/config b/email/dot-config/notmuch/default/config new file mode 100644 index 0000000..eeacdcc --- /dev/null +++ b/email/dot-config/notmuch/default/config @@ -0,0 +1,39 @@ +[database] +path=/home/moreka/.local/share/mail + +[user] +name=Mohammad Reza Karimi +primary_email=moreka@mit.edu + +[new] +tags=new +ignore=.mbsyncstate;.uidvalidity;.mbsyncstate.new;.mbsyncstate.lock + +[search] +exclude_tags=deleted;spam + +# Maildir compatibility configuration +# +# The following option is supported here: +# +# synchronize_flags Valid values are true and false. +# +# If true, then the following maildir flags (in message filenames) +# will be synchronized with the corresponding notmuch tags: +# +# Flag Tag +# ---- ------- +# D draft +# F flagged +# P passed +# R replied +# S unread (added when 'S' flag is not present) +# +# The "notmuch new" command will notice flag changes in filenames +# and update tags, while the "notmuch tag" and "notmuch restore" +# commands will notice tag changes and update flags in filenames + +[maildir] +synchronize_flags=true + +# vim: ft=confini diff --git a/email/dot-config/notmuch/default/hooks/post-new b/email/dot-config/notmuch/default/hooks/post-new new file mode 100755 index 0000000..063888b --- /dev/null +++ b/email/dot-config/notmuch/default/hooks/post-new @@ -0,0 +1,10 @@ +#!/bin/sh + +# remove "unread" from "replied" +notmuch tag -unread -new -- tag:replied + +# tag all "new" messages "inbox" and "unread" +notmuch tag +inbox +unread -new -- '(tag:new and folder:mit/INBOX)' + +# tag my replies as "sent" +notmuch tag -new -unread +sent -- '(from:"moreka@mit.edu*" not to:"moreka@mit.edu*" not tag:archived)' diff --git a/email/dot-config/oama/config.yaml b/email/dot-config/oama/config.yaml new file mode 100644 index 0000000..7f68064 --- /dev/null +++ b/email/dot-config/oama/config.yaml @@ -0,0 +1,15 @@ +## oama version 0.22.0 - 2025-08-29 0290.e419ef10 +## This is a YAML configuration file, indentation matters. +## Double ## indicates comments while single # default values. +## Not all defaults are shown, for full list run `oama printenv` +## and look at the `services:` section. + +encryption: + tag: GPG + contents: moreka@mit.edu + + +services: + microsoft: + client_id: 9e5f94bc-e8a4-4e73-b8be-63364c29d753 + tenant: common diff --git a/email/dot-config/systemd/user/goimap.service b/email/dot-config/systemd/user/goimap.service new file mode 100644 index 0000000..d315da8 --- /dev/null +++ b/email/dot-config/systemd/user/goimap.service @@ -0,0 +1,15 @@ +[Unit] +PartOf=graphical-session.target +Description=Execute scripts on IMAP mailbox changes (new/deleted/updated messages) using IDLE, golang version. +After=graphical-session.target +After=network-online.target +Requisite=graphical-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/goimapnotify -conf %h/.config/imapnotify/mit.yaml +Restart=always +RestartSec=300 + +[Install] +WantedBy=graphical-session.target -- cgit v1.2.3-71-gdd5e