blob: 97053ad00d9854163d8d5798b2e591b164933972 (
plain)
- #!/bin/sh
- #
- # /etc/local-COMMON/postfix/purge-spam-from-queue.sh
- # Copyright 2002 Jonas Smedegaard <dr@jones.dk>
- #
- # $Id: purge-spam-from-queue.sh,v 1.3 2003-03-29 10:25:31 jonas Exp $
- #
- # Purge non-important mails hanging in the queue (probably because of bounce to full mailbox or spam rejections)
- #
- # TODO: Improve filter!
- #
- badmails=`mailq | egrep -v '^( |$|\(|-)' | egrep '(MAILER-DAEMON|@earthlink\.net|@yahoo\.com|@excite\.com|@hotmail\.com)$' | sed 's/[^[:alnum:]].*//'`
- for x in $badmails; do
- postsuper -d $x
- done
|