[Mimedefang] Perl help: quarantine and bounce criteria

Gary Funck gary at intrepid.com
Tue Jan 25 11:23:46 EST 2005


> sub action_discard_bounce ($) {
>         my($message) = @_;
>         # don't quarantine if all recipients are @sewingwitch.com
>         my $non_sewingwitch =  grep !/\@sewingwitch.com/i, @Recipients;
>         # check for only recipient being
>         # hostmaster or info (almost certain spam so don't quarantine)
>         if ( $non_sewingwitch &&
>              ( (scalar @Recipients != 1) ||
>                ($Recipients[0] !~
>  /^(info|hostmaster)\@microprecisionautomation.com/) )) {

Above, you first check for $non_sewingwitch, which presumably means that
the mail isn't destined for sewingwitch, but then you _and_ this condition
with the following  check for info or hostmaster as the only recipient.
Did you mean || instead of && ?






More information about the MIMEDefang mailing list