require "fileinto"; if header :contains "from" "Sergey" { fileinto "test.mbox"; }