+ return unless $opts{execute};
+
+ while (!eof $msgfile) {
+ my %msgInfo = ReadMsg $msgfile;
+
+ my ($onlist, $rec, $sequence, $hit_count);
+
+ # Algorithm change: We now first check to see if the sender is not found
+ # in the message and skip it if so. Then we handle if we are the sender
+ # and that the from address is formatted properly. Spammers often use
+ # the senders email address (i.e. andrew@defaria.com) as their from address
+ # so we check "Andrew DeFaria <Andrew@DeFaria.com>", which they have never
+ # forged. This catches a lot of spam actually.
+ #
+ # Next we check to see if the sender is on our whitelist. If so then we let
+ # them in. This allows us to say whitelist josephrosenberg@hotmail.com while
+ # still nulllisting all of the other hotmail.com spammers.
+ #
+ # Next we process blacklisted people as they are also of high priority.
+ #
+ # Then we process nulllist people.
+ #
+ # Finally, we handle return processing
+
+ # Discard any email with an invalid email address
+ next unless Email::Valid->address($msgInfo{sender});
+
+ if ($msgInfo{sender} eq $user_email and
+ (lc ($msgInfo{sender_long}) !~ lc ("\"$username\" <$user_email>") and
+ lc ($msgInfo{sender_long}) !~ lc ("$username <$user_email>"))) {
+ $log->msg("Nulllisting message from sender ($msgInfo{sender_long}) pretending to be $user_email - Subject: $msgInfo{subject}");