summaryrefslogtreecommitdiffstats
path: root/.bin/nmutt
blob: 8abd47d817271843711bdf6a50d6cc3932ab8f1c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

NMUTT_CONFIGURATION_FILE="${HOME}/.config/neomutt/personal"

get_param() {
	grep "${2}" "${1}" |
		head -n 1 |
		rev |
		cut -d " " -f 1 |
		rev |
		tr -d '"'
}

export MAIL_SERVER=$(get_param "${NMUTT_CONFIGURATION_FILE}" "my_server")
export MAIL_USERNAME=$(get_param "${NMUTT_CONFIGURATION_FILE}" "my_user")
export MAIL_PASSWORD=$(get-pass "mailbox")

# get-mailbox-imap imap.${MAIL_SERVER} ${MAIL_USERNAME}@${MAIL_SERVER} ${MAIL_PASSWORD}
# offlineimap --dry-run
# mbsync -a

exec neomutt ${@}
remember that computers suck.