Sendmail troubleshooting

#remove unwanted mail messages in queue
cd /var/spool/mqueue

 rm $(grep -l "Subject: free information" *)

 rm $(grep -l "baddomain" *)

 # doesn't really work
 for i in $(mailq |awk '/baddomain/ {print $1}' )
 do
  echo $i
  rm *${i}*
 done

Đọc thêm..