1 2 3 4 5 6 7 8 9 10 11 12 13
#! /bin/bash if test -z "$*" ; then exit fi mail-scan +subject "$@" sa-learn --spam "$@" for file in "$@" ; do mv "$file" "$(dirname $file)/../spam/" done