summaryrefslogtreecommitdiff
path: root/bin/fetch_mail.sh
blob: 2f10567ebdcdac2792ab58a0f86461a9b7d343cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
set -x
MAIL_DIR=/home/cem/Mail

sync_toxic() {
	local TOXIC_MAIL=$MAIL_DIR/toxiclabs
	local TOXIC_NOTMUCH_CONFIG=$TOXIC_MAIL/notmuch-config
	local TOXIC_MBSYNC_CONFIG=$TOXIC_MAIL/mbsyncrc
	local TOXIC_NM_TAGS=$TOXIC_MAIL/tags.conf

	mbsync --config=$TOXIC_MBSYNC_CONFIG -q -a toxiclabs
	notmuch --config=$TOXIC_NOTMUCH_CONFIG new
	notmuch --config=$TOXIC_NOTMUCH_CONFIG tag --input=$TOXIC_NM_TAGS
}

sync_toxic