Switching from mbsync to offlineimap. More mail crap

master
Dustin Swan 10 years ago
parent 8a8771581a
commit f28c485ce7

@ -24,11 +24,6 @@ message = Gmail Inbox
query = folder:gmail/INBOX
tags = -new;+inbox
[Filter.6]
message = Archived
query = folder:iocom/INBOX.Archive OR 'folder:"gmail/[Gmail].All Mail"'
tags = -new
[Filter.8]
message = 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"'
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]
message = Builder
@ -61,26 +61,26 @@ message = Netmon
query = folder:iocom/INBOX.netmon
tags = +netmon;-spam;-new
# IOCOM tags
# IOCOM tags, no corresponding folder
[Filter.20]
message = Bugzilla
query = from:bugzilla-daemon@bugzilla.insors.net
tags = +bugzilla
# Gmail folders (what Gmail calls tags) TODO
# Gmail specific folders (what Gmail calls tags) TODO
[InboxFilter]
[MailMover]
folders = iocom/INBOX/ iocom/INBOX.Archive/ gmail/INBOX/
max_age = 15
folders = iocom/INBOX/ iocom/INBOX.Archive/
#max_age = 15
iocom/INBOX/ = 'NOT tag:inbox':iocom/INBOX.Archive/
iocom/INBOX.Archive/ = 'tag:inbox':iocom/INBOX/
gmail/INBOX/ = 'NOT tag:inbox':"gmail/[Gmail].All Mail"
gmail/[Gmail].Important/ = '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"
# TODO All folders <-> tags
#

@ -9,14 +9,12 @@ tabwidth = 4
sendmail_command = msmtp --account=DswanIOCOM -t
sent_box = maildir:///users/dustinswan/.mail/iocom/INBOX.Sent
draft_box = maildir:///users/dustinswan/.mail/iocom/INBOX.Drafts
# sent_tags = sent
[[Gmail]]
realname = Dustin Swan
address = dustinswan@gmail.com
gpg_key = 2B3A6377
sendmail_command = msmtp --account=DustinswanGmail -t
# sent_tags = sent
[bindings]
[[search]]

@ -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
while true; do
afew -m; mbsync -a; notmuch new
afew -m; offlineimap; notmuch new
sleep 45
done

@ -31,6 +31,7 @@ path=/Users/dustinswan/.mail
[user]
name=Dustin Swan
primary_email=dustinswan@gmail.com
other_email=dswan@iocom.com,dswan@insors.com
# Configuration for "notmuch new"
#

@ -1,2 +1,9 @@
#!/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

@ -2,7 +2,7 @@ import subprocess
import os
def gmail_password():
path = os.environ['HOME'] + "/.gmail_password.gpg"
path = os.environ['HOME'] + "/.gmail-password.gpg"
args = ["gpg", "-d", path]
try:
return subprocess.check_output(args).rstrip()
@ -10,7 +10,7 @@ def gmail_password():
return "".strip()
def iocom_password():
path = os.environ['HOME'] + "/.iocom_password.gpg"
path = os.environ['HOME'] + "/.iocom-password.gpg"
args = ["gpg", "-d", path]
try:
return subprocess.check_output(args).rstrip()

@ -1,9 +1,12 @@
[general]
accounts = IOCOM
accounts = IOCOM, Gmail
pythonfile = ~/dotfiles/offlineimap.py
[Account IOCOM]
localrepository = IOCOMLocal
remoterepository = IOCOMRemote
status_backend = sqlite
[Repository IOCOMLocal]
type = Maildir
@ -13,3 +16,22 @@ localfolders = ~/.mail/iocom
type = IMAP
remotehost = secure.emailsrvr.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

Loading…
Cancel
Save