diff --git a/goimapnotify/.config/goimapnotify/disroot.conf b/goimapnotify/.config/goimapnotify/disroot.conf deleted file mode 100644 index 3f2b051..0000000 --- a/goimapnotify/.config/goimapnotify/disroot.conf +++ /dev/null @@ -1,14 +0,0 @@ -{ - "host": "disroot.org", - "port": 993, - "tls": true, - "tlsOptions": { - "rejectUnauthorized": true - }, - "username": "akasroua@disroot.org", - "passwordCmd": "pass mail/disroot", - "onNewMail": "~/.local/share/scripts/mail-sync disroot", - "boxes": [ - "INBOX" - ] -} diff --git a/goimapnotify/.config/goimapnotify/gmail.conf b/goimapnotify/.config/goimapnotify/gmail.conf deleted file mode 100644 index 58f5d3c..0000000 --- a/goimapnotify/.config/goimapnotify/gmail.conf +++ /dev/null @@ -1,14 +0,0 @@ -{ - "host": "imap.gmail.com", - "port": 993, - "tls": true, - "tlsOptions": { - "rejectUnauthorized": true - }, - "username": "akasroua@gmail.com", - "passwordCmd": "pass mail/gmail", - "onNewMail": "~/.local/share/scripts/mail-sync gmail", - "boxes": [ - "INBOX" - ] -} diff --git a/goimapnotify/.config/goimapnotify/goimapnotify.yaml b/goimapnotify/.config/goimapnotify/goimapnotify.yaml new file mode 100644 index 0000000..bc62f54 --- /dev/null +++ b/goimapnotify/.config/goimapnotify/goimapnotify.yaml @@ -0,0 +1,22 @@ +configurations: + - + host: disroot.org + port: 993 + tls: true + tlsOptions: + rejectUnauthorized: true + username: akasroua@disroot.org + passwordCmd: 'pass mail/disroot' + onNewMail: '~/.local/share/scripts/mail-sync disroot' + - + host: imap.gmail.com + port: 993 + tls: true + tlsOptions: + rejectUnauthorized: true + username: akasroua@gmail.com + passwordCmd: 'pass mail/gmail' + onNewMail: '~/.local/share/scripts/mail-sync gmail' + boxes: + - + mailbox: INBOX diff --git a/scripts/.local/share/scripts/mail-sync b/scripts/.local/share/scripts/mail-sync index a431910..70358cc 100755 --- a/scripts/.local/share/scripts/mail-sync +++ b/scripts/.local/share/scripts/mail-sync @@ -1,11 +1,12 @@ #!/bin/sh +ACCOUNT="$1" + if [ $# -lt 1 ]; then - echo "Usage: mail-sync " - exit 1 + ACCOUNT="-a" fi -mbsync "$1" +mbsync "$ACCOUNT" if pgrep -f 'mu server'; then emacsclient -e '(mu4e-update-index)' else