blob: 55c58e48d1013850f33fedfbc95e42c834a6ee6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/bash
#
# Simple mail archiving tool.
#
# Setup.
INBOX="INBOX"
ZNBOX="ZNBOX"
YEAR="${1:-`date +%Y`}"
mkdir -p ~/mail/$ZNBOX/$YEAR/
# Archive mail.
mv ~/mail/$INBOX.* ~/mail/$ZNBOX/$YEAR/
# Start with a fresh folder structure.
for folder in `ls -1 ~/mail/$ZNBOX/$YEAR/ | grep $INBOX.`; do
mkdir -p ~/mail/$folder/{cur,new,tmp}
done
|