Compare commits
3 commits
3cc556fd33
...
bd24117af6
| Author | SHA1 | Date | |
|---|---|---|---|
| bd24117af6 | |||
| 7fd3db3e53 | |||
| b3e8e371ed |
4 changed files with 34 additions and 19 deletions
|
|
@ -38,8 +38,6 @@ ssh = "~"
|
||||||
"terminal/.config/vifm/vifmrc" = { target = "~/.config/vifm/vifmrc", type = "symbolic" }
|
"terminal/.config/vifm/vifmrc" = { target = "~/.config/vifm/vifmrc", type = "symbolic" }
|
||||||
terminal = "~"
|
terminal = "~"
|
||||||
|
|
||||||
# LINUX: A linux machine, with systemd enabled, auto-mounting set up and a nice productivity suite.
|
|
||||||
|
|
||||||
[linux]
|
[linux]
|
||||||
depends = ["base", "disks", "pass", "office", "services", "social", "writing"]
|
depends = ["base", "disks", "pass", "office", "services", "social", "writing"]
|
||||||
|
|
||||||
|
|
@ -66,8 +64,6 @@ office = "~"
|
||||||
"services/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" }
|
"services/README.md" = { target = "~/NOWHERE", type = "symbolic", if = "false" }
|
||||||
"services/usv.sh" = { target = "~/.config/sh/alias.d/usv.sh", type = "symbolic" }
|
"services/usv.sh" = { target = "~/.config/sh/alias.d/usv.sh", type = "symbolic" }
|
||||||
"services/sv" = { target = "~/.config/service", type = "symbolic"}
|
"services/sv" = { target = "~/.config/service", type = "symbolic"}
|
||||||
# FIXME: Disabling existing systemd services for the moment
|
|
||||||
"services/systemd" = { target = "~/NOWHERE", type = "symbolic", if = "false" }
|
|
||||||
services = "~"
|
services = "~"
|
||||||
|
|
||||||
[social.files]
|
[social.files]
|
||||||
|
|
|
||||||
10
office/.config/goimapnotify/goimapnotify.yaml
Normal file
10
office/.config/goimapnotify/goimapnotify.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
configurations:
|
||||||
|
- host: imap.example.com
|
||||||
|
port: 993
|
||||||
|
tls: true
|
||||||
|
tlsOptions:
|
||||||
|
starttls: false
|
||||||
|
boxes:
|
||||||
|
- mailbox: INBOX
|
||||||
|
onNewMail: neomutt-syncmail purelymail-inbox
|
||||||
|
onNewMailPost: 'notify-send "Incoming mail"'
|
||||||
|
|
@ -39,26 +39,35 @@
|
||||||
# MBSYNC_PASSWORD_FILE="/path/to/gpg/file.gpg"
|
# MBSYNC_PASSWORD_FILE="/path/to/gpg/file.gpg"
|
||||||
|
|
||||||
# What to run before and after decrypting the password file.
|
# What to run before and after decrypting the password file.
|
||||||
PASSWORD_CMD="pass open -t 1min"
|
if pass coffin -v 1>/dev/null 2>&1; then
|
||||||
|
PASSWORD_CMD="pass open -t 1min"
|
||||||
|
fi
|
||||||
|
|
||||||
# POST_PASSWORD_CMD=""
|
# POST_PASSWORD_CMD=""
|
||||||
|
|
||||||
|
PING_TARGET="9.9.9.9"
|
||||||
|
|
||||||
prehook() {
|
prehook() {
|
||||||
if [ -n "$MBSYNC_PRE" ]; then
|
if [ "$MBSYNC_PRE" != "" ]; then
|
||||||
eval "$MBSYNC_PRE"
|
eval "$MBSYNC_PRE"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
checkwarnuser
|
checkwarnuser
|
||||||
imapfilter -c "${XDG_CONFIG_HOME:-$HOME/.config}/imapfilter/config.lua"
|
if command -v imapfilter 1>/dev/null 2>&1; then
|
||||||
|
imapfilter -c "${XDG_CONFIG_HOME:-$HOME/.config}/imapfilter/config.lua"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
posthook() {
|
posthook() {
|
||||||
if [ -n "$MBSYNC_POST" ]; then
|
if [ "$MBSYNC_POST" != "" ]; then
|
||||||
eval "$MBSYNC_POST"
|
eval "$MBSYNC_POST"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
notmuch new 2>/dev/null
|
if command -v notmuch 1>/dev/null 2>&1; then
|
||||||
countnew
|
notmuch new 2>/dev/null
|
||||||
|
countnew
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# use notmuch to index incoming mail and set the
|
# use notmuch to index incoming mail and set the
|
||||||
|
|
@ -70,7 +79,7 @@ countnew() {
|
||||||
|
|
||||||
# fail the routine and optionally send a message why
|
# fail the routine and optionally send a message why
|
||||||
fail() {
|
fail() {
|
||||||
[ -n "$1" ] && echo "$1"
|
[ "$1" != "" ] && echo "$1"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,7 +89,7 @@ checkmail() {
|
||||||
|
|
||||||
checkonline() {
|
checkonline() {
|
||||||
# Ping 1.1.1.1 to confirm that we are on the internet
|
# Ping 1.1.1.1 to confirm that we are on the internet
|
||||||
ping -c 1 "1.1.1.1" >/dev/null 2>/dev/null || fail "checkmail can not access the internet."
|
ping -c 1 "$PING_TARGET" >/dev/null 2>/dev/null || fail "checkmail cannot access the internet."
|
||||||
}
|
}
|
||||||
|
|
||||||
# warn user that he has to enter his password in a moment
|
# warn user that he has to enter his password in a moment
|
||||||
|
|
@ -94,15 +103,15 @@ checkwarnuser() {
|
||||||
}
|
}
|
||||||
|
|
||||||
enablegpgagent() {
|
enablegpgagent() {
|
||||||
[ -n "$agt" ] && return
|
[ "$agt" != "" ] && return
|
||||||
|
|
||||||
if [ -n "$PASSWORD_CMD" ]; then
|
if [ "$PASSWORD_CMD" != "" ]; then
|
||||||
IFS=" " read -r -a PASSWORD_CMD <<<"$PASSWORD_CMD"
|
IFS=" " read -r -a PASSWORD_CMD <<<"$PASSWORD_CMD"
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
agt=$(${PASSWORD_CMD[@]})
|
agt=$("${PASSWORD_CMD[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$POST_PASSWORD_CMD" ]; then
|
if [ "$POST_PASSWORD_CMD" != "" ]; then
|
||||||
IFS=" " read -r -a POST_PASSWORD_CMD <<<"$POST_PASSWORD_CMD"
|
IFS=" " read -r -a POST_PASSWORD_CMD <<<"$POST_PASSWORD_CMD"
|
||||||
"${POST_PASSWORD_CMD[@]}"
|
"${POST_PASSWORD_CMD[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
@ -138,7 +147,7 @@ if [ "$1" = "raw" ]; then
|
||||||
checkmail
|
checkmail
|
||||||
exit
|
exit
|
||||||
# any other argument passed through selects mbsync targets
|
# any other argument passed through selects mbsync targets
|
||||||
elif [ -n "$1" ]; then
|
elif [ "$1" != "" ]; then
|
||||||
selected_mailbox="$1"
|
selected_mailbox="$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -153,7 +162,7 @@ main() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tries=$((tries + 1))
|
tries=$((tries + 1))
|
||||||
if [ $tries -gt "${MBSYNC_MAX_TRIES:-3}" ]; then
|
if [ "$tries" -gt "${MBSYNC_MAX_TRIES:-3}" ]; then
|
||||||
fail "maximum retries reached without success."
|
fail "maximum retries reached without success."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
# gets known e-mail adresses out of the current notmuch database
|
# gets known e-mail adresses out of the current notmuch database
|
||||||
#
|
#
|
||||||
# called like `mail-searchcontacts [myadress]`
|
# called like `notmuch-contacts [myadress]`
|
||||||
#
|
#
|
||||||
# where myaddress can be anything that connects mails to their adresses:
|
# where myaddress can be anything that connects mails to their adresses:
|
||||||
# if directly found in the 'from': field, it will return those adresses
|
# if directly found in the 'from': field, it will return those adresses
|
||||||
Loading…
Add table
Add a link
Reference in a new issue