Changeset 2658 for trunk/server/fedora/config/etc/scripts
- Timestamp:
- Dec 20, 2014, 2:58:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/fedora/config/etc/scripts/prune-mailq
r2657 r2658 7 7 $0 list-from 8 8 $0 list-to 9 $0 show-rand [from |to] [regex]9 $0 show-rand [from regex|to regex] 10 10 $0 email lockers... 11 11 $0 purge-from lockers... … … 16 16 exit 1 17 17 } 18 18 19 clean_locker() { 19 20 echo "${1%%@scripts.mit.edu}" … … 33 34 if [[ $# -eq 0 ]]; then 34 35 files=$(ls /var/spool/postfix/deferred/?/* | shuf | head -n 3) 35 el se36 elif [[ $# -eq 2 ]]; then 36 37 match=$2 37 38 case "$1" in … … 42 43 msgids=$(mailq | tail -n +2 | grep -v '^ *(' | awk "BEGIN { RS = \"\" } (\$$dir ~ /$match/) { print \$1 }" | shuf | head -n 3) 43 44 files=$(for msgid in $msgids; do echo /var/spool/postfix/deferred/${msgid:0:1}/$msgid; done) 45 else 46 usage 44 47 fi 45 48 for file in $files; do 46 49 echo ">>>> $file"; 47 strings"$file"50 postcat "$file" 48 51 echo; 49 52 done
Note: See TracChangeset
for help on using the changeset viewer.