刪除 queue 中特定的收件者或寄件者的信件

刪除 queue 中特定的收件者或寄件者的信件

刪除特定 e-mail 寄信者
mailq | grep "xxx@qq.com" | cut -d " " -f1 | cut -d "*" -f1 | postsuper -d -

刪除特定 email 收信者
mailq|grep -C 1 "@qq.com" | grep -v "@qq.com" | cut -d " " -f1|cut -d "*" -f1 |grep -v "-" | postsuper -d -
mailq|grep -C 2 "@qq.com" | grep -v "@qq.com" | cut -d " " -f1|cut -d "*" -f1|grep -v "-"|grep -v '^$'|postsuper -d - (不含空白列)


grep -v '^$' 去掉完全沒有資料的空白列




~~




沒有留言:

張貼留言