David, et al -
        From a quick test, it looks to me like $delay (optional fifth
return element from filter_[sender|relay|recipient]) is ignored if
$code is "CONTINUE". 

        I'd like to insert a delay after every RCPT for a given
message if bad recipients have been found, and increment the delay
value each time a new bad recipient has been found... e.g. 

sub filter_recipient {
    my $lerrfile="./olc-luser-errors";
    my $unkluser=0;
    my $delay=0;
    my ($recipient, $sender, $ip, $hostname, $first, $helo, $rcpt_mailer, $rcpt_host, 
$rcpt_addr) = @_;
        # fail "open" if we can't open $lerrfile for read/write
        if (open (LERRS, "+>> $lerrfile")) {
            while (<LERRS>) {
                chomp ($unkluser=<LERRS>);
            }
            if bad_recipient($recipient) {
                $unkluser++;
                print LERRS "$unkluser\n";
            }
            close(LERRS);
            # cumulative penalty for any bad RCPTs
            $delay=($unkluser*2);
            $unkluser && return ('REJECT', "$recipient... LUser unknown", "550", 
"5.1.1", "$delay");
        }
    # if we've already seen bad RCPTs, delay valid ones too
    return ('CONTINUE', "ok", "250", "2.1.5", "$delay");
}

        but my $delay is ignored in the second return statement above.
<poke, sniff> in fact, so is my DSN. Is this a milter limitation or a
multiplexor characteristic?

        Thanks,
                Ole
-- 
Ole Craig * UNIX, linux, SMTP-ninja; news, web; SGI martyr * CS Computing
Facility, UMass * <www.cs.umass.edu/~olc/pgppubkey.txt> for public key

   Need a seasoned *NIX admin in the Denver/Boulder area? Hire me!
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to