Stuff
public shellscript v1 · immutable#!/bin/zshset -ezmodload zsh/statfind . -type f -ctime +30 . | while read i; do [[ "$(sed -n '0,/^$/{/^X-Spam-Flag: Yes/p}' <"$i")" = "" ]] && rm -f "$i" || { dd=$(stat +ctime -F "%Y%m" "$i") [[ -d ".$dd" ]] || mkdir -p ".$dd" ".$dd/new" ".$dd/cur" ".$dd/tmp" mv -f "$i" ".$dd/cur/" }done