diff --git a/afew/config b/afew/config index 89e85eb..66bed74 100644 --- a/afew/config +++ b/afew/config @@ -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 # diff --git a/alot/config b/alot/config index 97d8c1d..9f143ce 100644 --- a/alot/config +++ b/alot/config @@ -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]] diff --git a/alot/hooks.py b/alot/hooks.py new file mode 100644 index 0000000..ee4a003 --- /dev/null +++ b/alot/hooks.py @@ -0,0 +1,5 @@ +import logging +from subprocess import call +def post_envelope_send(**kwargs): + logging.info('calling "notmuch new!"') + call(["notmuch", "new"]) diff --git a/bin/check_mail.sh b/bin/check_mail.sh index 749f4b4..5775502 100755 --- a/bin/check_mail.sh +++ b/bin/check_mail.sh @@ -1,5 +1,5 @@ #!/bin/bash while true; do - afew -m; mbsync -a; notmuch new + afew -m; offlineimap; notmuch new sleep 45 done diff --git a/notmuch-config b/notmuch-config index 3632f09..0ffa8a2 100644 --- a/notmuch-config +++ b/notmuch-config @@ -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" # diff --git a/notmuch-post-new b/notmuch-post-new index 19a2fed..4c2d55d 100755 --- a/notmuch-post-new +++ b/notmuch-post-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 diff --git a/mutt/offlineimap.py b/offlineimap.py similarity index 78% rename from mutt/offlineimap.py rename to offlineimap.py index 211ed52..ddb2120 100644 --- a/mutt/offlineimap.py +++ b/offlineimap.py @@ -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() diff --git a/offlineimaprc b/offlineimaprc index 4ee56d6..114e1eb 100644 --- a/offlineimaprc +++ b/offlineimaprc @@ -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