Browse Source

Moved to mbsync and gopass instead of offlineimap and pass

master
Micah Halter 2 years ago
parent
commit
a4ea77467a
Signed by: mehalter GPG Key ID: 4224A6EA9A8CAAA8
  1. 2
      CHANGELOG.md
  2. 2
      Makefile
  3. 67
      isync/.config/isync/mbsyncrc
  4. 9
      isync/.config/systemd/user/mbsync.service
  5. 10
      isync/.config/systemd/user/mbsync.timer
  6. 4
      msmtp/.config/msmtp/config
  7. 3
      mutt/.config/mutt/gatechrc
  8. 3
      mutt/.config/mutt/gmailrc
  9. 2
      mutt/.config/mutt/muttrc
  10. 2
      offlineimap/.config/offlineimap/offlineimap.py
  11. 4
      scripts/.local/bin/bemenupass
  12. 2
      scripts/.local/bin/gohome
  13. 4
      tmux/.config/tmux/tmux.conf
  14. 2
      vdirsyncer/.config/vdirsyncer/password.sh
  15. 14
      zsh/.config/zsh/aliases

2
CHANGELOG.md

@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- Added `isync` configuration
- Added `gopass` and moved `pass` support to `gopass`
- Added `sudo` lecture file to prompt for yubikey input
- Added yubikey oauth `bemenu` interface
- Added ability to update `cmus`

2
Makefile

@ -63,6 +63,7 @@ arch: pacman
gimp \
gimp-plugin-gmic \
git \
gopass \
gparted \
gscan2pdf \
i3-gaps \
@ -83,7 +84,6 @@ arch: pacman
openvpn \
pandoc \
pandoc-citeproc \
pass \
pavucontrol \
pdfpc \
picom \

67
isync/.config/isync/mbsyncrc

@ -0,0 +1,67 @@
IMAPAccount gmail
Host imap.gmail.com
User mhalter3378@gmail.com
PassCmd "pass offlineimap/gmail"
AuthMechs LOGIN
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
IMAPStore gmail-remote
Account gmail
MaildirStore gmail-local
Subfolders Verbatim
Path /home/micah/.local/share/Mail/Gmail/
Inbox /home/micah/.local/share/Mail/Gmail/INBOX
Channel gmail
Master :gmail-remote:
Slave :gmail-local:
Patterns * !"[Gmail]/All Mail"
Create Both
SyncState *
IMAPAccount gatech
Host outlook.office365.com
User mhalter3@gatech.edu
PassCmd "pass offlineimap/gatech"
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
IMAPStore gatech-remote
Account gatech
MaildirStore gatech-local
Subfolders Verbatim
Path /home/micah/.local/share/Mail/Gatech/
Inbox /home/micah/.local/share/Mail/Gatech/INBOX
Channel gatech
Master :gatech-remote:
Slave :gatech-local:
Patterns * !"Calendar" !"Calendar/Birthdays" !"Calendar/United States holidays" !"Contacts" !"Conversation History" !"Journal" !"Notes" !"Tasks"
Create Both
SyncState *
IMAPAccount gtri
Host localhost
Port 1143
User mhalter3-gtri
PassCmd "pass offlineimap/gatech"
SSLType IMAPS
CertificateFile /home/micah/.config/davmail/davmail.crt
IMAPStore gtri-remote
Account gtri
MaildirStore gtri-local
Subfolders Verbatim
Path /home/micah/.local/share/Mail/GTRI/
Inbox /home/micah/.local/share/Mail/GTRI/INBOX
Channel gtri
Master :gtri-remote:
Slave :gtri-local:
Patterns * !"Calendar" !"Calendar/Birthdays" !"Calendar/United States holidays" !"Contacts" !"Conversation History" !"Journal" !"Notes" !"Tasks" !"Trash"
Create Both
SyncState *

9
isync/.config/systemd/user/mbsync.service

@ -0,0 +1,9 @@
[Unit]
Description=Mailbox synchronization service
[Service]
Type=oneshot
ExecStart=/usr/bin/mbsync -c /home/micah/.config/isync/mbsyncrc -Va
ExecStartPre=/bin/sh -c 'echo "" > /tmp/mailsync'
ExecStartPost=/usr/bin/notmuch new
ExecStopPost=/bin/sh -c 'if [ "$$EXIT_STATUS" = 0 ]; then rm /tmp/mailsync; else echo "" > /tmp/mailsync; fi && notifymail'

10
isync/.config/systemd/user/mbsync.timer

@ -0,0 +1,10 @@
[Unit]
Description=Mailbox synchronization timer
[Timer]
OnBootSec=2m
OnUnitActiveSec=5m
Unit=mbsync.service
[Install]
WantedBy=timers.target

4
msmtp/.config/msmtp/config

@ -11,7 +11,7 @@ logfile ~/.logs/msmtp.log
account gmail
from micah@mehalter.com
user mhalter3378@gmail.com
passwordeval "pass offlineimap/gmail"
passwordeval "gopass offlineimap/gmail"
host smtp.gmail.com
port 587
@ -19,6 +19,6 @@ port 587
account gatech
from mehalter@gatech.edu
user mhalter3@gatech.edu
passwordeval "pass offlineimap/gatech"
passwordeval "gopass offlineimap/gatech"
host outlook.office365.com
port 587

3
mutt/.config/mutt/gatechrc

@ -16,8 +16,7 @@ mailboxes =INBOX =Archive =Drafts =Sent\ Items =Deleted\ Items
set query_command="khard email --parsable %s"
macro index i "<shell-escape>offlineimap -q -a gatech -f INBOX<enter>" "sync current inbox"
macro index I "<shell-escape>offlineimap -q -a gatech<enter>" "sync current inbox"
macro index i "<shell-escape>mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc gatech<enter>" "sync current inbox"
macro index A ":set confirmappend=no delete=yes resolve=no\n<clear-flag>N<tag-prefix><save-message>=Archive<enter><sync-mailbox>:set confirmappend=yes delete=ask-yes resolve=yes\n" "Archive Message"
macro pager A ":set confirmappend=no delete=yes resolve=no\n<save-message>=Archive<enter><sync-mailbox>:set confirmappend=yes delete=ask-yes resolve=yes\n" "Archive Message"

3
mutt/.config/mutt/gmailrc

@ -17,8 +17,7 @@ mailboxes =INBOX =other =[Gmail].Drafts =[Gmail].Sent\ Mail =[Gmail].Trash
set query_command="khard email -a Contacts --parsable %s"
macro index i "<shell-escape>offlineimap -q -a gmail -f INBOX<enter>" "sync current inbox"
macro index I "<shell-escape>offlineimap -q -a gmail<enter>" "sync current inbox"
macro index i "<shell-escape>mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc gmail<enter>" "sync current inbox"
macro index A ":set confirmappend=no delete=yes resolve=no\n<clear-flag>N<tag-prefix><save-message>=other<enter><sync-mailbox>:set confirmappend=yes delete=ask-yes resolve=yes\n" "Archive Message"
macro pager A ":set confirmappend=no delete=yes resolve=no\n<save-message>=other<enter><sync-mailbox>:set confirmappend=yes delete=ask-yes resolve=yes\n" "Archive Message"

2
mutt/.config/mutt/muttrc

@ -102,7 +102,7 @@ macro index,pager ac "<pipe-message>khard add-email<return>" "Add sender to Khar
bind index,pager s noop
macro index,pager sc "<shell-escape>vdirsyncer sync gaddr<return>" "sync contacts"
macro index Z "<shell-escape>offlineimap<enter>" "sync all mail"
macro index Z "<shell-escape>mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc -a<enter>" "sync all mail"
macro index,pager \cu "<pipe-message> urlscan<Enter>" "call urlscan to extract URLs out of a message"
macro attach,compose \cu "<pipe-entry> urlscan<Enter>" "call urlscan to extract URLs out of a message"

2
offlineimap/.config/offlineimap/offlineimap.py

@ -1,4 +1,4 @@
import subprocess
def mailpasswd(account):
return subprocess.check_output(["pass", account]).strip()
return subprocess.check_output(["gopass", account]).strip()

4
scripts/.local/bin/bemenupass

@ -18,9 +18,9 @@ password=$(printf '%s\n' "${password_files[@]}" | bemenucolor -p "Passwords:" -i
[[ -n $password ]] || exit
if [[ $typeit -eq 0 ]]; then
pass show -c "$password" 2>/dev/null
gopass show -c "$password" 2>/dev/null
notify-send "Password copied" &
else
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
gopass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
xdotool type --clearmodifiers --file -
fi

2
scripts/.local/bin/gohome

@ -1,6 +1,6 @@
#!/bin/env sh
pass OpenVpn/micah | sudo openvpn --config "$XDG_CONFIG_HOME"/openvpn/mhalter3-gtri.ovpn --askpass /dev/stdin --script-security 2 \
gopass OpenVpn/micah | sudo openvpn --config "$XDG_CONFIG_HOME"/openvpn/mhalter3-gtri.ovpn --askpass /dev/stdin --script-security 2 \
--setenv PATH '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
--up /etc/openvpn/scripts/update-systemd-resolved \
--down /etc/openvpn/scripts/update-systemd-resolved \

4
tmux/.config/tmux/tmux.conf

@ -9,11 +9,11 @@ set -g history-limit 10000
# set Ctrl-a as the default prefix key combination
# and unbind C-b to free it up
set -g prefix C-a
set -g prefix C-q
unbind C-b
# use send-prefix to pass C-a through to application
bind C-a send-prefix
bind C-q send-prefix
# shorten command delay
set -sg escape-time 1

2
vdirsyncer/.config/vdirsyncer/password.sh

@ -1,3 +1,3 @@
#!/bin/sh
pass vdirsyncer/"$1"
gopass vdirsyncer/"$1"

14
zsh/.config/zsh/aliases

@ -68,14 +68,14 @@ alias vim='nvim'
alias arc='aria2c'
alias sc='scim'
# pass aliases
alias pshow='pass show'
alias pedit='pass edit'
alias pupdate='pass update -p'
alias ptail='pass tail'
alias ptedit='pass tailedit'
# gopass aliases
alias pshow='gopass show'
alias pedit='gopass edit'
alias pupdate='gopass update -p'
alias ptail='gopass tail'
alias ptedit='gopass tailedit'
pnew() {
pass cp template $1 && pass edit $1
gopass cp template $1 && gopass edit $1
}
# python aliases

Loading…
Cancel
Save