/ Published in: Bash

Delete emails matching a phrase in the headers.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/sh cd /var/spool/mqueue for i in `grep -sl "<some common phrase in the headers>" qf*` do j=`ls -1 "$i" | sed 's/qf\(.*\)$/df\1/'` echo "Deleting $i ($j)" rm $i $j done
Comments
