handles keywords, greylists and blacklists