require "fileinto"; if exists "X-Spam-Score" { fileinto "Junk"; stop; } if header :contains "Received-SPF" "Softfail" { fileinto "Junk"; stop; }