+
+ # does an identical message already exist?
+ my $m;
+ for $m (@msg) {
+ if ($ref->{subject} eq $m->{subject} && $ref->{t} == $m->{t} && $ref->{from} eq $m->{from}) {
+ $ref->stop_msg($self);
+ my $msgno = $m->{msgno};
+ dbg('msg', "duplicate message to $msgno\n");
+ Log('msg', "duplicate message to $msgno");
+ return;
+ }
+ }
+
+ # look for 'bad' to addresses
+ if (grep $ref->{to} eq $_, @badmsg) {
+ $ref->stop_msg($self);
+ dbg('msg', "'Bad' TO address $ref->{to}");
+ Log('msg', "'Bad' TO address $ref->{to}");
+ return;
+ }
+