- ($status, $rule) = OnNulllist $sender;
- if ($status) {
- print div {-align => "center"},
- font {-color => "grey"},
- "Messages from", b ($sender), "will be", b ("discarded"), br, hr;
- print $rule;
+ # 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
+
+ # Some email addresses have a '+' in them (e.g.
+ # wipro+autoreply@talent.icims.com). The problem is that CGI.pm replaces the
+ # '+' with a space. Now email addresses cannot contain spaces so we're gonna
+ # assume that a space in the email should be a '+'.
+ $sender =~ s/\s/\+/g;
+
+ ($onlist, $rec) = OnWhitelist($sender, $userid, 0);
+
+ if ($onlist) {
+ print div {-align => "center"},
+ font {-color => "green"},
+ "Messages from", b ($sender), "will be", b ("delivered"), br, hr;
+ print formatRule('white', $sender, $rec);