All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
8 echo "$ME -- list postponed messages which have expired"
9 echo "Copyright © martin f. krafft <madduck@madduck.net>"
10 echo "Released under the terms of the Artistic Licence 2.0"
15 echo "Usage: $ME [options] <Maildir> [<Maildir> ...]"
17 echo "Valid options are:"
18 cat <<-_eof | column -s\& -t
19 -V|--version & show version information.
20 -h|--help & show this output.
21 -a|--all & list all postponed messages, not only expired ones
22 -s|--stamp & include the time stamp *before* the filename
27 LONGOPTS=version,help,all,stamp
33 for opt in $(getopt -n $ME -o $SHORTOPTS -l $LONGOPTS -u -- "$@"); do
35 -V|--version) about; exit 0;;
36 -h|--help) about; echo; usage; exit 0;;
38 -s|--stamp) timestamp=1;;
41 if [ -d "$opt/cur" ] && [ -d "$opt/new" ] && [ -d "$opt/tmp" ]; then
42 maildirs="$maildirs $opt"
44 echo "E: unknown argument: $opt" >&2
51 if [ -z "$maildirs" ]; then
52 echo "E: no Maildirs specified." >&2
58 for i in $maildirs; do
63 | xargs -I {} find {} -type f \
64 | xargs grep -H --text '^X-Postponed:' \
66 f="${i%:X-Postponed:*}"
67 ts="${i#*:X-Postponed: }"; ts="${ts%% *}"
69 if [ $listall -eq 1 ] || [ $ts -le $NOW ]; then
70 [ $timestamp -eq 1 ] && echo -n "$ts "