Adapt goimapnotify configuration to YAML

This commit is contained in:
coolneng 2025-05-09 16:00:14 +02:00
parent 5c326f2e01
commit 1787b7da6a
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
4 changed files with 26 additions and 31 deletions

View File

@ -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"
]
}

View File

@ -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"
]
}

View File

@ -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

View File

@ -1,11 +1,12 @@
#!/bin/sh #!/bin/sh
ACCOUNT="$1"
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
echo "Usage: mail-sync <account name>" ACCOUNT="-a"
exit 1
fi fi
mbsync "$1" mbsync "$ACCOUNT"
if pgrep -f 'mu server'; then if pgrep -f 'mu server'; then
emacsclient -e '(mu4e-update-index)' emacsclient -e '(mu4e-update-index)'
else else