Changeset 2670 for trunk/server/fedora/config/etc
- Timestamp:
- Feb 16, 2015, 2:54:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/fedora/config/etc/scripts/prune-mailq
r2658 r2670 19 19 clean_locker() { 20 20 echo "${1%%@scripts.mit.edu}" 21 } 22 23 canonicalize_address() { 24 if [[ "$1" == *@* ]]; then 25 echo "$1" 26 else 27 echo "$1@scripts.mit.edu" 28 fi 21 29 } 22 30 … … 88 96 fi 89 97 for locker in "$@"; do 90 locker=$(clean_locker"$locker")91 echo "$ locker..."92 mailq | tail -n +2 | grep -v '^ *(' | awk "BEGIN { RS = \"\" } (\$7 == \"$ locker@scripts.mit.edu\") { print \$1 }" | tr -d '*!' | postsuper -d -98 address=$(canonicalize_address "$locker") 99 echo "$address..." 100 mailq | tail -n +2 | grep -v '^ *(' | awk "BEGIN { RS = \"\" } (\$7 == \"$address\") { print \$1 }" | tr -d '*!' | postsuper -d - 93 101 echo 94 102 done … … 101 109 fi 102 110 for locker in "$@"; do 103 locker=$(clean_locker"$locker")104 echo "$ locker..."105 mailq | tail -n +2 | grep -v '^ *(' | awk "BEGIN { RS = \"\" } (\$8 == \"$ locker@scripts.mit.edu\" && \$9 == \"\") { print \$1 }" | tr -d '*!' | postsuper -d -111 address=$(canonicalize_address "$locker") 112 echo "$address..." 113 mailq | tail -n +2 | grep -v '^ *(' | awk "BEGIN { RS = \"\" } (\$8 == \"$address\" && \$9 == \"\") { print \$1 }" | tr -d '*!' | postsuper -d - 106 114 echo 107 115 done
Note: See TracChangeset
for help on using the changeset viewer.