# $Id: reject-subject,v 1.3 2002/12/14 01:26:30 root Exp $
#
# Reject mail with a subject that has any of the words or patterns
# listed in a user's "subjects-" file.
exception {
    SHELL=/bin/sh

    /^Subject: .*/
    if (lookup(escape($MATCH), '.mailfilters/subjects-'))
    {
	xfilter "reformail -A '$JUNK_TAG: rejected: bad subject ($MATCH)'"
	to $JUNK
    }
}
