Skip to content

Instantly share code, notes, and snippets.

@dr-kd
Created November 26, 2021 00:42
Show Gist options
  • Save dr-kd/131f8d425fe89f730f6f00a2ef75c7c3 to your computer and use it in GitHub Desktop.
Save dr-kd/131f8d425fe89f730f6f00a2ef75c7c3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# script to update your header cache for imap folders of interest non-interactively.
# set this up to run nightly in cron - it especially helps the performance of BIG mail boxes
# e.g. mailboxes big enough to crash outlook are super-snappy after header cache refresh
declare -a FOLDERS=("Archive"
"Drafts"
"INBOX"
"Outbox"
"Sent\ Items"
"Tasks"
"Trash"
# etc ...
)
for i in "${FOLDERS[@]}"
do
tmux -c "mutt -f =$i -e 'push <quit>'"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment