--- /Users/justin/Documents/DADA/jCVS_DADA/dada_mail_stable/dada/plugins/dada_bridge.pl 2005-08-24 16:38:51.000000000 -0600 +++ /Users/justin/Desktop/dada_bridge_1_36.pl 2005-08-24 16:47:45.000000000 -0600 @@ -632,8 +632,7 @@ eval { $from_address = (Email::Address->parse($rough_from))[0]->address; } } - print '\t\tWarning! Something\'s wrong with the From address - ' . $@ - if $@ && $verbose; + print '\t\tWarning! Something\'s wrong with the From adddress - ' . $@ if $@; $from_address = lc_email($from_address); @@ -678,26 +677,18 @@ print "\t\tDiscussion Support enabled...\n" if $verbose; - if($li->{enable_moderation} && $errors->{msg_not_from_moderator} == 0){ + my ($s_status, $s_errors) = $lh->subscription_check(-Email => $from_address); - print "\t\tSubscription checked skipped - moderation enabled and address passed validation.\n"; - + if ($s_errors->{subscribed} != 1){ + $errors->{msg_not_from_subscriber} = 1; + print "\t\t*Message is NOT from a subscriber.\n" + if $verbose; }else{ - - my ($s_status, $s_errors) = $lh->subscription_check(-Email => $from_address); - - if ($s_errors->{subscribed} != 1){ - $errors->{msg_not_from_subscriber} = 1; - print "\t\t*Message is NOT from a subscriber.\n" - if $verbose; - }else{ - print "\t\t*Message *is* from a current subscriber.\n" - if $verbose; - $errors->{msg_not_from_moderator} = 0; - $errors->{msg_not_from_list_owner} = 0; - } + print "\t\t*Message *is* from a current subscriber.\n" + if $verbose; + $errors->{msg_not_from_moderator} = 0; + $errors->{msg_not_from_list_owner} = 0; } - }else{ print "\t\tDiscussion Support disabled...\n"; } @@ -709,13 +700,10 @@ if $verbose; } - foreach(keys %$errors){ - if($errors->{$_} == 1){ - $status = 0 ; - last; - } - } - + foreach(keys %$errors){ + $status = 0 if $errors->{$_} == 1; + last; + } return ($status, $errors); }