blob: 13b0a608b10e4744ae892c8244433b3f311ca48c (
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.2 2002-12-31 13:38:42 jonas Exp $
- #
- # Purge non-important mails hanging in the queue (probably because of bounce to full mailbox)
- #
- # TODO: Improve filter!
- #
- badmails=`mailq | egrep -v '^( |$)' | egrep '@(earthlink\.net|yahoo\.com|excite\.com|hotmail\.com)' | sed 's/[^[:alnum:]].*//'`
- for x in $badmails; do
- postsuper -d $x
- done
|