nsbin/archive_mails.sh
Nico Schottelius df2daf524d init
Signed-off-by: Nico Schottelius <nico@manager.schottelius.org>
2017-07-19 17:15:41 +02:00

15 lines
281 B
Bash
Executable file

#!/bin/sh
# Nico Schottelius
# clean current mailbox, so imap connections are faster
set -e
maildir="$HOME/Maildir"
curdir="$maildir/cur"
date=$(date +%Y-%m-%d)
archiv="$HOME/mail-archiv"
ddir="${archiv}/${date}/"
mkdir -p "$ddir"
find "$curdir" -type f -exec mv {} "$ddir" \;