Mailfetch::Rule::From - match Froms
my $blacklisted_From = Mailfetch::Rule::From->new( blacklist => 'header-from-blacklist.txt', rule_name => 'blacklisted From', action => 'Delete', ); ... if ($blacklisted_From->applies($mail)) { $blacklisted_From->action->execute($mail); # adios muchacho };
This module matches against the to
, cc
, bcc
and x-envelope-to
headers.