From 9058ea4a1d9543f3ff9ed0aca82fab80344afb8b Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Mon, 13 Aug 2018 13:56:35 +0200 Subject: [PATCH] add posteo mail, use pass for mail and notmuch address --- config/alot/config | 26 +++++++++++++++++++----- mbsyncrc | 47 +++++++++++++++++++++++++++++++++++++++++-- msmtprc | 15 +++++++++----- notmuch-hooks/pre-new | 2 +- 4 files changed, 77 insertions(+), 13 deletions(-) diff --git a/config/alot/config b/config/alot/config index 3aff9d9..1637d5e 100644 --- a/config/alot/config +++ b/config/alot/config @@ -8,10 +8,26 @@ editor_cmd = "st -e vis" [accounts] + [[posteo]] + realname = Felix Van der Jeugt + address = felix.vanderjeugt@posteo.net + gpg_key = 68FF561137C38F9618E97339AF25A2C2862AA368 + sendmail_command = /usr/bin/msmtp --account=posteo -t + sent_box = maildir:///data/mail/posteo/Sent + draft_box = maildir:///data/mail/posteo/Drafts + sent_tags = # none + sign_by_default = False + + [[[abook]]] + type = shellcommand + command = 'notmuch address date:1Y..' + regexp = (?P.*) <(?P.+)> + shellcommand_external_filtering = False + [[gmail]] realname = Felix Van der Jeugt address = felix.vanderjeugt@gmail.com - aliases = Felix.Vanderjeugt@gmail.com, + aliases = felixvdj@zeus.ugent.be alias_regexp = felix\.vanderjeugt\+.+@gmail.com gpg_key = 68FF561137C38F9618E97339AF25A2C2862AA368 sendmail_command = /usr/bin/msmtp --account=gmail -t @@ -22,9 +38,9 @@ editor_cmd = "st -e vis" [[[abook]]] type = shellcommand - command = 'notmuch-abook.sh' + command = 'notmuch address date:1Y..' regexp = (?P.*) <(?P.+)> - shellcommand_external_filtering = True + shellcommand_external_filtering = False [[ugent]] @@ -40,9 +56,9 @@ editor_cmd = "st -e vis" [[[abook]]] type = shellcommand - command = 'notmuch-abook.sh' + command = 'notmuch address date:1Y..' regexp = (?P.*) <(?P.+)> - shellcommand_external_filtering = True + shellcommand_external_filtering = False [bindings] diff --git a/mbsyncrc b/mbsyncrc index 700c2c8..8728377 100644 --- a/mbsyncrc +++ b/mbsyncrc @@ -3,17 +3,23 @@ IMAPAccount gmail Host "imap.gmail.com" User "felix.vanderjeugt@gmail.com" -PassCmd "gpg2 -u Noctua -q --no-secmem-warning --for-your-eyes-only --no-tty -d ~/.config/passwords.gpg | sed -n 's/gmail=//p'" +PassCmd "pass show other/gmail" SSLType "IMAPS" CertificateFile "/etc/ssl/certs/ca-certificates.crt" IMAPAccount ugent Host "owa.ugent.be" User "felix.vanderjeugt@ugent.be" -PassCmd "gpg2 -u Noctua -q --no-secmem-warning --for-your-eyes-only --no-tty -d ~/.config/passwords.gpg | sed -n 's/ugent=//p'" +PassCmd "pass show web/ugent.be | head -1" AuthMechs "PLAIN" SSLTYPE "IMAPS" CertificateFile "/etc/ssl/certs/ca-certificates.crt" + +IMAPAccount posteo +Host "posteo.de" +User "felix.vanderjeugt@posteo.net" +PassCmd "pass show other/posteo-mbsync" +SSLTYPE "IMAPS" # }}} Accounts # Remote Stores {{{ @@ -22,6 +28,9 @@ Account "gmail" IMAPStore ugent-remote Account "ugent" + +IMAPStore posteo-remote +Account "posteo" # }}} # Local Stores {{{ @@ -34,6 +43,10 @@ Path "/data/mail/ugent/" Inbox "/data/mail/ugent/Inbox" Trash "/data/mail/ugent/Trash" SubFolders "Verbatim" + +MaildirStore posteo-local +Path "/data/mail/posteo/" +Inbox "/data/mail/posteo/Inbox" # }}} # Channels {{{ @@ -73,6 +86,30 @@ Master ":ugent-remote:Verwijderde Items" Slave ":ugent-local:Trash" Create "Slave" SyncState "*" + +Channel posteo-inbox +Master ":posteo-remote:Inbox" +Slave ":posteo-local:" +Create "Slave" +SyncState "*" + +Channel posteo-sent +Master ":posteo-remote:Sent" +Slave ":posteo-local:Sent" +Create "Slave" +SyncState "*" + +Channel posteo-trash +Master ":posteo-remote:Trash" +Slave ":posteo-local:Trash" +Create "Slave" +SyncState "*" + +Channel posteo-draft +Master ":posteo-remote:Drafts" +Slave ":posteo-local:Drafts" +Create "Slave" +SyncState "*" # }}} # Groups {{{ @@ -85,6 +122,12 @@ Group ugent Channel "ugent-inbox" Channel "ugent-sent" Channel "ugent-trash" + +Group posteo +Channel "posteo-inbox" +Channel "posteo-sent" +Channel "posteo-trash" +Channel "posteo-draft" # }}} # vim: foldmethod=marker diff --git a/msmtprc b/msmtprc index 0cdcc55..3f8a270 100644 --- a/msmtprc +++ b/msmtprc @@ -6,21 +6,26 @@ tls on tls_trust_file /etc/ssl/certs/ca-certificates.crt logfile ~/.local/share/msmtp.log -# Gmail account gmail host smtp.gmail.com port 587 from felix.vanderjeugt@gmail.com user felix.vanderjeugt -passwordeval "gpg2 -q --no-secmem-warning --for-your-eyes-only --no-tty -d ~/.config/passwords.gpg | sed -n 's/gmail=//p'" +passwordeval "pass show other/gmail" -# UGent account ugent host smtp.ugent.be port 587 from felix.vanderjeugt@ugent.be user felix.vanderjeugt@ugent.be -passwordeval "gpg2 -q --no-secmem-warning --for-your-eyes-only --no-tty -d ~/.config/passwords.gpg | sed -n 's/ugent=//p'" +passwordeval "pass show web/ugent.be | head -1" + +account posteo +host posteo.de +port 587 +from felix.vanderjeugt@posteo.net +user felix.vanderjeugt@posteo.net +passwordeval "pass show web/posteo.de | head -1" # Set a default account -account default : gmail +account default : posteo diff --git a/notmuch-hooks/pre-new b/notmuch-hooks/pre-new index 79af665..a7549d2 100755 --- a/notmuch-hooks/pre-new +++ b/notmuch-hooks/pre-new @@ -1,2 +1,2 @@ #!/bin/sh -mbsync -qq ugent gmail +mbsync -qq -a