On Sat, Dec 29, 2001 at 11:07:29AM +0100, [EMAIL PROTECTED] wrote: > In past my host was open relay - people from company want to snend emails > from home -my mistake - and a lot spammers put through my host a lot of > mails. When I have closed open relay a lot of frozen mails stayed in my exim > queue and staying there till now. Exim couldn't send them. How should I > delete this unwanted queue. > hi Mateusz Mazur i had written a script to do this. u should type 'remex email -r' to delete the mail. i will attached it with this mail Ok. -jijo jose
# remove msges from exim queue # by jijojose ;[EMAIL PROTECTED] if test -z mailq ; then echo "No Messages in Exim Queue -exit" exit 0 fi if [ "$1" = "" ] || [ "$2" = "" ]; then echo "Usage remex email_address [-p postpone] [ -r remove]" echo "by <[EMAIL PROTECTED]>" #mailq echo "v 1.00" exit 0 fi h=$(grep -l $1 /var/spool/exim/msglog/*|cut -b24-) if [ ! $h = "" ]; then a=("/var/spool/exim/input/"$h"-H") c=$(grep '\<Subject:' $a) if [ "$2" = "-p" ]; then #cat "/var/spool/exim/input/"$h"-D" cat "/var/spool/exim/input/"$h"-D" exit 0 fi if [ "$2" = "-r" ]; then echo "Remove Msg With " $c " ID "$h" y/N" read a if [ $a = "y" ]; then exim -Mrm $h echo "removed" else echo "Exit" fi fi else echo "No such address" fi