Postfix Mail Queue Cleaner 
Monday, 14 April 2014, 12:17 - Tools & more, Knowledge, Postfix Stuff
Posted by Administrator
This small shell script removes all messages originating from a certain sender address out of the postfix mail queue.


#! /bin/bash
if [ "$1" == "" ]; then
echo "please give e-mail address"
exit 1
else
emailaddr=$1
fi
for id in `mailq | egrep "[0-9A-F]{10} " | grep "$emailaddr" | cut -d " " -f 1`
do
echo $id
postsuper -d $id
done


add comment ( 741 views )   |  permalink   |  $star_image$star_image$star_image$star_image$star_image ( 3 / 317 )

<<First <Back | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Next> Last>>