Switching from mbsync to offlineimap. More mail crap
This commit is contained in:
24
afew/config
24
afew/config
@@ -24,11 +24,6 @@ message = Gmail Inbox
|
|||||||
query = folder:gmail/INBOX
|
query = folder:gmail/INBOX
|
||||||
tags = -new;+inbox
|
tags = -new;+inbox
|
||||||
|
|
||||||
[Filter.6]
|
|
||||||
message = Archived
|
|
||||||
query = folder:iocom/INBOX.Archive OR 'folder:"gmail/[Gmail].All Mail"'
|
|
||||||
tags = -new
|
|
||||||
|
|
||||||
[Filter.8]
|
[Filter.8]
|
||||||
message = Drafts
|
message = Drafts
|
||||||
query = folder:iocom/INBOX.Drafts OR 'folder:"gmail/[Gmail].Drafts"'
|
query = folder:iocom/INBOX.Drafts OR 'folder:"gmail/[Gmail].Drafts"'
|
||||||
@@ -49,7 +44,12 @@ message = Trash
|
|||||||
query = folder:iocom/INBOX.Trash OR 'folder:"gmail/[Gmail].Trash"'
|
query = folder:iocom/INBOX.Trash OR 'folder:"gmail/[Gmail].Trash"'
|
||||||
tags = -new;+trash
|
tags = -new;+trash
|
||||||
|
|
||||||
# IOCOM folders
|
[Filter.15]
|
||||||
|
message = Archived
|
||||||
|
query = folder:iocom/INBOX.Archive OR 'folder:"gmail/[Gmail].All Mail"'
|
||||||
|
tags = -new;-inbox
|
||||||
|
|
||||||
|
# IOCOM specific folders
|
||||||
|
|
||||||
[Filter.16]
|
[Filter.16]
|
||||||
message = Builder
|
message = Builder
|
||||||
@@ -61,26 +61,26 @@ message = Netmon
|
|||||||
query = folder:iocom/INBOX.netmon
|
query = folder:iocom/INBOX.netmon
|
||||||
tags = +netmon;-spam;-new
|
tags = +netmon;-spam;-new
|
||||||
|
|
||||||
# IOCOM tags
|
# IOCOM tags, no corresponding folder
|
||||||
|
|
||||||
[Filter.20]
|
[Filter.20]
|
||||||
message = Bugzilla
|
message = Bugzilla
|
||||||
query = from:bugzilla-daemon@bugzilla.insors.net
|
query = from:bugzilla-daemon@bugzilla.insors.net
|
||||||
tags = +bugzilla
|
tags = +bugzilla
|
||||||
|
|
||||||
# Gmail folders (what Gmail calls tags) TODO
|
# Gmail specific folders (what Gmail calls tags) TODO
|
||||||
|
|
||||||
[InboxFilter]
|
[InboxFilter]
|
||||||
|
|
||||||
[MailMover]
|
[MailMover]
|
||||||
folders = iocom/INBOX/ iocom/INBOX.Archive/ gmail/INBOX/
|
folders = iocom/INBOX/ iocom/INBOX.Archive/
|
||||||
max_age = 15
|
#max_age = 15
|
||||||
|
|
||||||
iocom/INBOX/ = 'NOT tag:inbox':iocom/INBOX.Archive/
|
iocom/INBOX/ = 'NOT tag:inbox':iocom/INBOX.Archive/
|
||||||
iocom/INBOX.Archive/ = 'tag:inbox':iocom/INBOX/
|
iocom/INBOX.Archive/ = 'tag:inbox':iocom/INBOX/
|
||||||
|
|
||||||
gmail/INBOX/ = 'NOT tag:inbox':"gmail/[Gmail].All Mail"
|
#gmail/INBOX/ = 'NOT tag:inbox':"gmail/[Gmail].All Mail"
|
||||||
gmail/[Gmail].Important/ = 'NOT tag:inbox':"gmail/[Gmail].All Mail"
|
#gmail/[Gmail].Important/ = 'NOT tag:inbox':"gmail/[Gmail].All Mail"
|
||||||
|
|
||||||
# TODO All folders <-> tags
|
# TODO All folders <-> tags
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -9,14 +9,12 @@ tabwidth = 4
|
|||||||
sendmail_command = msmtp --account=DswanIOCOM -t
|
sendmail_command = msmtp --account=DswanIOCOM -t
|
||||||
sent_box = maildir:///users/dustinswan/.mail/iocom/INBOX.Sent
|
sent_box = maildir:///users/dustinswan/.mail/iocom/INBOX.Sent
|
||||||
draft_box = maildir:///users/dustinswan/.mail/iocom/INBOX.Drafts
|
draft_box = maildir:///users/dustinswan/.mail/iocom/INBOX.Drafts
|
||||||
# sent_tags = sent
|
|
||||||
|
|
||||||
[[Gmail]]
|
[[Gmail]]
|
||||||
realname = Dustin Swan
|
realname = Dustin Swan
|
||||||
address = dustinswan@gmail.com
|
address = dustinswan@gmail.com
|
||||||
gpg_key = 2B3A6377
|
gpg_key = 2B3A6377
|
||||||
sendmail_command = msmtp --account=DustinswanGmail -t
|
sendmail_command = msmtp --account=DustinswanGmail -t
|
||||||
# sent_tags = sent
|
|
||||||
|
|
||||||
[bindings]
|
[bindings]
|
||||||
[[search]]
|
[[search]]
|
||||||
|
|||||||
5
alot/hooks.py
Normal file
5
alot/hooks.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import logging
|
||||||
|
from subprocess import call
|
||||||
|
def post_envelope_send(**kwargs):
|
||||||
|
logging.info('calling "notmuch new!"')
|
||||||
|
call(["notmuch", "new"])
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
while true; do
|
while true; do
|
||||||
afew -m; mbsync -a; notmuch new
|
afew -m; offlineimap; notmuch new
|
||||||
sleep 45
|
sleep 45
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ path=/Users/dustinswan/.mail
|
|||||||
[user]
|
[user]
|
||||||
name=Dustin Swan
|
name=Dustin Swan
|
||||||
primary_email=dustinswan@gmail.com
|
primary_email=dustinswan@gmail.com
|
||||||
|
other_email=dswan@iocom.com,dswan@insors.com
|
||||||
|
|
||||||
# Configuration for "notmuch new"
|
# Configuration for "notmuch new"
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,2 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# For mail my other MUAs has moved
|
||||||
|
|
||||||
|
# Look for mail in folder INBOX.Archive that have inbox. Remove inbox.
|
||||||
|
notmuch tag -inbox -- folder:INBOX.Archive tag:inbox
|
||||||
|
|
||||||
|
# Initial tagging for new mail
|
||||||
afew --tag --new
|
afew --tag --new
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import subprocess
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
def gmail_password():
|
def gmail_password():
|
||||||
path = os.environ['HOME'] + "/.gmail_password.gpg"
|
path = os.environ['HOME'] + "/.gmail-password.gpg"
|
||||||
args = ["gpg", "-d", path]
|
args = ["gpg", "-d", path]
|
||||||
try:
|
try:
|
||||||
return subprocess.check_output(args).rstrip()
|
return subprocess.check_output(args).rstrip()
|
||||||
@@ -10,7 +10,7 @@ def gmail_password():
|
|||||||
return "".strip()
|
return "".strip()
|
||||||
|
|
||||||
def iocom_password():
|
def iocom_password():
|
||||||
path = os.environ['HOME'] + "/.iocom_password.gpg"
|
path = os.environ['HOME'] + "/.iocom-password.gpg"
|
||||||
args = ["gpg", "-d", path]
|
args = ["gpg", "-d", path]
|
||||||
try:
|
try:
|
||||||
return subprocess.check_output(args).rstrip()
|
return subprocess.check_output(args).rstrip()
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
[general]
|
[general]
|
||||||
accounts = IOCOM
|
accounts = IOCOM, Gmail
|
||||||
|
pythonfile = ~/dotfiles/offlineimap.py
|
||||||
|
|
||||||
|
|
||||||
[Account IOCOM]
|
[Account IOCOM]
|
||||||
localrepository = IOCOMLocal
|
localrepository = IOCOMLocal
|
||||||
remoterepository = IOCOMRemote
|
remoterepository = IOCOMRemote
|
||||||
|
status_backend = sqlite
|
||||||
|
|
||||||
[Repository IOCOMLocal]
|
[Repository IOCOMLocal]
|
||||||
type = Maildir
|
type = Maildir
|
||||||
@@ -13,3 +16,22 @@ localfolders = ~/.mail/iocom
|
|||||||
type = IMAP
|
type = IMAP
|
||||||
remotehost = secure.emailsrvr.com
|
remotehost = secure.emailsrvr.com
|
||||||
remoteuser = dswan@insors.com
|
remoteuser = dswan@insors.com
|
||||||
|
remotepasseval = iocom_password()
|
||||||
|
realdelete = no
|
||||||
|
|
||||||
|
|
||||||
|
[Account Gmail]
|
||||||
|
localrepository = GmailLocal
|
||||||
|
remoterepository = GmailRemote
|
||||||
|
status_backend = sqlite
|
||||||
|
|
||||||
|
[Repository GmailLocal]
|
||||||
|
type = Maildir
|
||||||
|
localfolders = ~/.mail/gmail
|
||||||
|
|
||||||
|
[Repository GmailRemote]
|
||||||
|
type = Gmail
|
||||||
|
remoteuser = dustinswan@gmail.com
|
||||||
|
remotepasseval = gmail_password()
|
||||||
|
realdelete = no
|
||||||
|
sslcacertfile = /usr/local/opt/curl-ca-bundle/share/ca-bundle.crt
|
||||||
|
|||||||
Reference in New Issue
Block a user